An object of alternate ids for this object, with values as [[AltId]]
// 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
// 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.
// 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)
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]].
const ids = obj.asArray().map(ob => ob);
An array of [[RelationshipFormEntry]] containing the list of options have become newly selected or unselected as part of the current edit. This field is of the same type as the options field, but contains a different list of options. Note, that the changed values will usually be in either the selected or original option lists, but those list also contain options that have not been changed. Namely, options which are in both the selected and original lists, will probably not be in the changed list...that is unless they have been deselected then reselected. A similar condition can occur for options that have been selected then deselected
Get the children of the object. This retrieval goes one level deep.
Optional
classType: string | numberconst childrenNames = obj.children().map(child => child.displayName());
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.
const deleted = baseObject.deletedChildren();
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.
The following assumes you have already aggregated a selection of baseObject
s 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.
Returns this field's [[FormMetaData]] object.
const form = firstName.form();
const fieldNames = [];
for (field in form) fieldNames.push(form[field].displayName());
Gets an array of all the object's ancestors.
const numberOfAncestors = obj.getAncestors().length;
The [[Id]] of this object bounded to T.
const displayDiv = `<div class="object-card" id="${baseObject.id()}">
<div class="title">${baseObject}</div>
<div class="body">Hello World!</div>
</div>;
This function checks if entry is selected, given the id of the entry. The result of this function is a optional boolean value indicating one of three things: A value of true means the id is selected; a value of false means it is not selected; a value of empty means there is a configuration problem such as [[isSelected]] being called on an empty object or the id is not a potential selection.
Returns the Local Cache object for this Thread/Base Object.
Returns the [[FieldMetaData]] object that this describes this field.
const firstNameClass = firstName.metaData().styleClass();
Same as [[selected]]
A [[Java.Optional]] of the ancestor with the specific class.
const ancestors = obj.optAncestor(1000001).ifPresent(a => console.log('${a} exists'));
A [[Java.Optional]] of the current object's parent object.
Optional
classType: string | numberconst ancestors = obj.optAncestor(1000001).ifPresent(a => console.log('${a} found'));
This method gets an optional [[RelationshipFormEntry]] for the current field, given the [[Id]] of an [[Entry]] or an [[Entry]] of a potentially selectable entry.
An array of [[RelationshipFormEntry]] containing the list of currently valid options which may be selected.
An array of [[RelationshipFormEntry]] containing the list options that were selected at the beginning of the current edit. This field is of the same type as the options field, but contains a different list of options. Note, that the formerly selected values may not be currently valid, and therefore may not be in the options list. Also, the originally selected items may or may not be currently selected.
Same as calling optParent(var).orElse(null)
Optional
classType: string | numberThis method gets a [[RelationshipFormEntry]] for the current field, given the [[Id]] of an [[Entry]] or an [[Entry]] of a potentially selectable entry.
An array of [[RelationshipFormEntry]] containing the list options that are currently selected. This field is of the same type as the options field, but contains a different list of options. Note, that the currently selected values may not be currently valid, and therefore may not be in the list.
Sets or clears the relationship to another entry, given the id of the entry. It is only available when the relationship field is editable. Returns true
if successful. A retrurn of false
means it was unsuccessful because, for instance, the id doesn't belong to the target form.
The [[Id]] or [[AltId]] that the system deems most relevant.
const displayDiv = `<div class="object-card" id="${baseObject.topId()}">
<div class="title">${baseObject}</div>
<div class="body">Hello World!</div>
</div>;
Use [[set]] instead.
Same as [[selected]]
The versions of this object.
const versions = baseObject.versions();
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
.
const viewBtn = `<button data-href="${baseObject.viewUrl()}">Go to ${baseObject.displayName()}</button>;
Generated using TypeDoc
[[RelationshipField]] are represented using a custom data type.