The litany of metadata associated with a field.

Most of the metadata examples use the following accessor as a base:

Example

B.queries.byFID['allUsers'].require();
const user = allUsers.byId[userId];
user.forms.byFID['profile'].require();
const fields = user.profile.fields();
explore example
[[B.queries]], [[BaseObjectLookup.byFID]], [[B.QueryMetaData.require]], [[B.FormMetaData.fields]]

But don't think that there are no other ways to get to a field.

Type Parameters

  • T

Hierarchy

Constructors

Methods

  • Returns the activeX value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().activeX();
    
  • Returns the advanced options value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().advancedOpts();
    
  • Returns the allow other of the field.

    Returns string

    Example

    const allowOther = fields.firstName.metaData().allowOther();
    
  • An object of alternate ids for this object, with values as [[AltId]]

    Returns {
        [name: string]: AltId<T>;
    }

    Example

    // you've marked certain forms with the FID of deprecated and want to filter for those
    const warningMessage = baseObject.altIdsObject().FID.value().includes('deprecated') && 'Please use a different form';
  • An object of alternate ids for this object, with values as strings

    Returns {
        [name: string]: string;
    }

    • [name: string]: string

    Example

    // you've marked certain forms with the FID of deprecated and want to filter for those
    const warningMessage = baseObject.altIds().FID.includes('deprecated') && 'Please use a different form';
  • An array of alternate ids for this object.

    Returns EList<FieldMetaData<T>>

    Example

    // you've marked certain forms with the FID of deprecated and want to filter for those
    const warningMessage = baseObject.altIds().FID.includes('deprecated') && 'Please use a different form';
  • Same as calling optAncestor(var).orElse(null)

    Type Parameters

    Parameters

    • classType: string | number

    Returns B

  • If this object is a Collection it returns it as an array. The majority of objects in the system are Collections. For most objects, this is the same as calling [[children]].

    Returns EList<BaseObject<any>>

    Example

    const ids = obj.asArray().map(ob => ob);
    
  • Returns the autocopy value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().autocopy();
    
  • Returns the checkbox label of a boolean field. Only applicable when [[formatType]] is checkbox.

    Returns string

    Example

    const checkboxLabel = fields.clear.metaData().booleanCheckboxLabel();
    // 'Clear date range'
  • Returns the radio false label of a boolean field. Only applicable when [[formatType]] is radio.

    Returns string

    Example

    const falseLabel = fields.pendApproval.metaData().booleanRadioFalseLabel();
    // 'Remove Record'
  • Returns the radio true label of a boolean field. Only applicable when [[formatType]] is radio.

    Returns string

    Example

    const trueLabel = fields.pendApproval.metaData().booleanRadioTrueLabel();
    // 'Accept Record'
  • Returns the cardinality value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().cardinality();
    
  • Get the children of the object. This retrieval goes one level deep.

    Parameters

    • Optional classType: string | number

    Returns EList<BaseObject<any>>

    Example

    const childrenNames = obj.children().map(child => child.displayName());
    
  • Returns the cleanup value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().cleanup();
    
  • The "created at" timestamp of this object.

    Returns Instant

    Example

    const createdAt = `<div class="created-at">${baseObject.created()}</div>`;
    
  • The creator of this object.

    Returns User

    Example

    alert(`Guess who created this. It was ${baseObject.creator().fullName()}. They are to blame.`);
    
  • Returns the custom lock value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().customLock();
    
  • Returns the custom params of the field.

    Returns string

    Example

    const customParams = fields.firstName.metaData().customParams();
    
  • Returns the data length of the field.

    Returns string

    Example

    const dataLength = fields.firstName.metaData().dataLength();
    
  • Returns the default value of the field.

    Returns string

    Example

    const defaultValue = fields.firstName.metaData().defaultValue();
    
  • Returns the default value type of the field.

    Returns string

    Example

    const defaultValueType = fields.firstName.metaData().defaultValueType();
    
  • Returns a delete URL for this object, else a blank string. Following the URL will delete the object, so proceed with caution.

    Returns string

    Example

    const deleteBtn = `<button data-href="${baseObject.deleteUrl()}">Go to ${baseObject.displayName()}</button>;
    
  • The deleted children of this object. Only looks one level deep. E.g. a form's deleted children could include fields and form entries. A folder's deleted children could include folders, forms, and formulas, but not any of those forms' entries.

    Returns EList<BaseObject<any>>

    Example

    const deleted = baseObject.deletedChildren();
    
  • Returns the display cut off value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().displayCutOff();
    
  • Returns the display cut off 2 value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().displayCutOff2();
    
  • The default display name of this object. For the most part, this is the same as calling toString(), which is the same as inserting the object into a string.

    Returns string

    Example

    The following assumes you have already aggregated a selection of baseObjects into an array

    const displayNames = [];
    for (const o of baseObjects) displayNames.push(o.displayName());
    const namesList = `<ul><li>${displayNames.join('</li><li>')}</li></ul>`;
  • Sets the Display Name.

    Parameters

    • name: string

    Returns void

  • Returns an edit URL for this object, else a blank string.

    Returns string

    Example

    const editBtn = `<button data-href="${baseObject.editUrl()}">Go to ${baseObject}</button>`;
    
  • Returns the entity type of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().entityType()
    ;```
  • Get the [[Field]] associated with the [[FieldMetaData]]. It will search for a current [[Record]] and throw an error if it can't find one.Current [[Record]] is not available on End Points.

    Parameters

    • Optional writable: boolean

      Defaults to false.

    Returns Field<any, T>

    Example

    TODO
    
  • Get the [[Field]] associated with the [[FieldMetaData]], given a particular [[BaseRecord]].

    Parameters

    • record: BaseRecord<any>

      A [[BaseRecord]] that the [[Field]]'s [[Form]] is attached to.

    • Optional writable: boolean

      Defaults to false.

    Returns Field<any, T>

    Example

    TODO
    
  • Returns the field control field key of a field. The possible values are a list of the [[BooleanField]]s, [[SingleSelectField]]s, and [[SignatureField]]s. Only accessible when [[fieldControlType]]is custom.

    Returns string

    Example

    const customViewKey = fields.date.metaData().fieldControlFieldKey(); // 'signature'
    
  • Returns the field control field value of a field. The possible values are a list of the possible values of the selected [[fieldControlFieldKey]]. Only accessible when [[fieldControlType]] is custom.

    Returns string

    Example

    const customViewVal = fields.date.metaData().fieldControlFieldValue(); // 'signed'
    
  • Returns the field control type of a field.

    • Normal (''): Editing and viewing of the field based strictly on permissions
    • Hidden (hiddenDefault): Always hidden on the generic layout
    • View-Only (readonlyDefault): Always view-only on the generic layout
    • Calculated (smartHide): Generic layout displays view-only when the field has a value or hidden when it is empty
    • Once (readonlyWhenCompleted): The field displays as normal until it is completed, then it becomes view-only
    • Custom (custom): See [[fieldControlView]]

    Returns string

    Example

    // check that a date field is view-only when the form has been signed
    const controlType = fields.date.metaData().fieldControlType(); // 'custom'
    const customView = fields.date.metaData().fieldControlView(); // 'readonly'
    const customViewKey = fields.date.metaData().fieldControlFieldKey(); // 'signature'
    const customViewVal = fields.date.metaData().fieldControlFieldValue(); // 'signed'
  • Returns the field control view of a field. Only accessible when [[fieldControlType]] is custom.

    • View-Only (readonly): Becomes view-only when conditions are met
    • Hidden (hidden): Becomes hidden when conditions are met

    Returns string

    Example

    const customView = fields.date.metaData().fieldControlView(); // 'readonly'
    
  • The [[FormMetaData]] object associated with this field.

    Returns FormMetaData

  • Returns the format type of the field.

    • Text: none, memo, phone, email, measurement, url, state, taxId, zip, selection, medName, medProductID, ICD9Dx, ICD10CM, ICD10Next, DSM5, medBillingRevCode, drugAllergy, drugAllergyRxNorm, bp, cptCode, labCodes, creditCard, medispanBehaviors
    • Memo: none, emailList, html
    • Date/Time: date, time, dateTime
    • Number: integer, float, money
    • Boolean: checkbox, radio
    • Single Select: select, list, lookup, radio
    • Multiple Select: list, lookup, checkboxGroup
    • signature: simple, secure
    • Document: name, thumbnail
    • Relationship: See [[displayCutOff]]
    • Biometric: signaturepad, biometric
    • Merge Report: full, small

    Returns string

    Example

    const formatType = fields.email.metaData().formatType(); // 'email'
    
  • Returns the field formula, which is used to modify the field on save. Both itself and other fields can be referenced here via [[formulaId]].

    Returns string

    Example

    const fieldFormula = fields.firstName.metaData().formula();
    // 'lastName + ", " + firstName'
  • Returns the formula id of a field, which is used to reference the field in a [[formula]].

    Returns string

    Example

    const formulaIds = Object.values(fields).map(f => f.metaData().formulaId());
    // ['firstName', 'prefName', 'email', ...]
  • Returns the grouping value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().grouping();
    
  • Returns the height of the field.

    Returns string

    Example

    const height = fields.firstName.metaData().height();
    
  • Returns the hint of the field. The hint can be displayed either below the label or in a popup. See [[popUpHint]].

    Returns string

    Example

    const hint = fields.midName.metaData().hint();
    // 'The middle name is the one between the first and last names'
  • The [[Id]] of this object bounded to T.

    Returns Id<FieldMetaData<T>>

    Example


    const displayDiv = `<div class="object-card" id="${baseObject.id()}">
    <div class="title">${baseObject}</div>
    <div class="body">Hello World!</div>
    </div>;
  • Returns whether the object is locked or not.

    Returns boolean

    Deprecated

    Part of the [[Lock]] API.

    Example

    const isLocked = baseObject.isLocked();
    
  • Returns whether the object is pending a lock or not.

    Returns boolean

    Deprecated

    Part of the [[Lock]] API.

    Example

    const isPendingLock = baseObject.isPendingLock();
    
  • Returns whether the object is pending an unlock or not.

    Returns boolean

    Deprecated

    Part of the [[Lock]] API.

    Example

    const lockPendingUnlock = baseObject.isPendingUnLock();
    
  • Returns the label of the field. A label overrides the display name in display situations.

    Returns string

    Example

    const label = fields.aka.metaData().label(); // 'Alias/Nickname'
    
  • Returns the list options key of the field.

    Returns string

    Example

    const listOpKey = fields.firstName.metaData().listOptionsKey();
    
  • Same as calling optLock().orElse(null)

    Returns Lock

  • Returns whether long label format has been checked or not.

    Returns string

    Example

    const longLabel = fields.firstName.metaData().longLabel(); // 'false'
    
  • Returns the max number of characters that can be input into the field.

    Returns string

    Example

    const maxLength = fields.firstName.metaData().maxLength(); // 'null'
    
  • Returns the maximum value of the field. Applies to number fields.

    Returns string

    Example

    const maxValue = fields.firstName.metaData().maximumValue();
    
  • Returns the minimum value of the field. Applies to number fields.

    Returns string

    Example

    const minValue = fields.firstName.metaData().minimumValue();
    
  • The modified date of this object.

    Returns Instant

    Example

    const isModified = baseObject.modified();
    
  • The [[User]] that last modified this object.

    Returns User

    Example

    const modifierName = baseObject.modifier().fullName();
    
  • Returns the never hide hint of the field.

    • true: Never hide the hint\n- false: Hide the hint when the field is view-only

    Returns string

    Example

    const neverHideHint = fields.firstName.metaData().neverHideHint(); // 'false'
    
  • Returns the new column of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().newColumn();
    
  • A [[Java.Optional]] of the ancestor with the specific class.

    Parameters

    • classType: string | number

    Returns Optional<BaseObject<any>>

    Example

    const ancestors = obj.optAncestor(1000001).ifPresent(a => console.log('${a} exists'));
    
    explore example
    [[Java.Optional.ifPresent]]
  • Returns the [[Lock]]

    Returns Optional<Lock>

    Deprecated

    Part of the [[Lock]] API.

    Example

    const lockExpire = baseObject.optLock();
    
  • A [[Java.Optional]] of the current object's parent object.

    Parameters

    • Optional classType: string | number

    Returns Optional<BaseObject<any>>

    Example

    const ancestors = obj.optAncestor(1000001).ifPresent(a => console.log('${a} found'));
    
    explore example
    [[Java.Optional.ifPresent]]
  • Same as calling optParent(var).orElse(null)

    Type Parameters

    Parameters

    • Optional classType: string | number

    Returns B

  • Returns the picker option of the field.

    Returns string

    Example

    const pickerOption = fields.firstName.metaData().pickerOption();
    
  • Returns the placeholder of the field.

    Returns string

  • Returns whether popup hint has been checked or not. When unchecked, the hint is always viewable beneath the field label.

    Returns string

    Example

    const popupHint = fields.firstName.metaData().popUpHint(); // 'false'
    
  • Returns the postfix of the field.

    Returns string

    Example

    const postfix = fields.firstName.metaData().postfix();
    
  • Returns the prefix of the field.

    Returns string

    Example

    const prefix = fields.firstName.metaData().prefix();
    
  • Returns the print format type of the field.

    Returns string

    Example

    const printFormatType = fields.firstName.metaData().printFormatType();
    
  • Returns the reciprocal of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().reciprocal();
    
  • Returns the relationship of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().relationship();
    
  • Returns the relationship to of the field.

    Returns string

    Example

    const relWith = fields.firstName.metaData().relationshipTo();
    
  • Returns the relationship with of the field.

    Returns string

    Example

    const relWith = fields.firstName.metaData().relationshipWith();
    
  • Returns the report label of the field. The report label supercedes label and display name in report views.

    Returns string

    Example

    const reportLabel = fields.firstName.metaData().reportLabel();
    // 'The name by which you shall henceforth be known is'
  • Add the field so the inspector can find it.

    Parameters

    • writable: boolean

      When true, mark in the inspector that the field is writable

    Returns FieldMetaData<T>

  • Reset the current object so that it is cleared from the cache and looked up from the database.

    Returns void

  • Returns the show link value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().showLink();
    
  • Returns the static content value of a Static Content Data Type.

    Returns string

    Example

    const val = fields.staticDiagram.metaData().staticContent();
    
  • Returns the style class of a field.

    Returns string

    Example

    const styleClass = fields.email.metaData().styleClass(); // 'email'
    
  • Returns the sub format type of the field.

    Returns string

    Example

    const subFormatType = fields.firstName.metaData().subFormatType();
    
  • Returns the symmetric value of a field.

    Returns string

    Example

    const val = fields.firstName.metaData().symmetric();
    
  • Returns the bluestep.js classpath for the current object.

    Returns string

    Example

    const isBool = testForm.fields.mysteryField.typeName().toLowerCase().includes('boolean')
    
  • Makes changes to the database for this object

    Returns void

  • The version of this object or empty string if it doesn't exist.

    Returns string

    Example

    const version = baseObject.version();
    
  • Returns a view URL for this object, if it has one. This value is always a relative URL, meaning it does not contain the protocol prefix or domain name such as http://xyz.bluestep.net.

    Returns string

    Example

    const viewBtn = `<button data-href="${baseObject.viewUrl()}">Go to ${baseObject.displayName()}</button>;
    
  • Returns the width of the field. If the [[formatType]] is 'text' or 'password', most browsers interpret <input> width as ems (the width of the letter 'M'). It should be interpreted as pixels otherwise.

    Returns string

    Example

    const width = fields.firstName.metaData().width(); // '20'
    

Generated using TypeDoc