Script API accepted values
info
This content is intended for advanced Studio users.
This page lists all accepted enumerated values for Script API method parameters.
Event types
Used as the eventType parameter in addListener and removeListener.
| Value | Description |
|---|---|
CHANGE | Fired whenever the value of the field changes. The most commonly used event type. |
CLICK | Fired every time a button is clicked. |
TERMINOLOGY_CHANGE | Fired when the terminology URL or parameters change. |
EVENT_IS_HIDDEN | Fired every time a field becomes hidden or visible. |
EVENT_ANNOTATION_VALUE | Fired every time the user adds an annotation to an element. |
EVENT_IS_READ_ONLY | Fired every time a field becomes read-only or editable. |
EVENT_MAX_UPDATED | Fired every time the maximum multiplicity changes. |
EVENT_MIN_UPDATED | Fired every time the minimum multiplicity changes. |
EVENT_CHILDREN_UPDATED | Fired on a container every time its children are updated. |
INPUT_ITEMS_UPDATED | Fired every time the input items of a field are updated. |
DATASOURCE_CHANGE | Fired every time the data source of a field or list changes. |
WIDGET_CONFIG_CHANGE | Fired when the configuration of a widget changes. |
WIDGET_OUTPUT_EVENT | Fired every time a widget sends an output event. |
WIDGET_INPUT_ACTION | Fired every time a widget receives an input action. |
CLEAR_CANVAS_MARKUP | Fired every time a Generic Canvas field is cleared. |
SEARCH_INPUT_CHANGES | Fired every time the search input of a coded text field changes. |
COMPOSITION_SAVED | Fired when the composition is saved. |
EVENT_IS_COLLAPSED | Fired every time a container is expanded or collapsed. |
DEFAULT_VALUE_CHANGE | Fired when the default value of a field changes. |
LABEL_CHANGE | Fired every time the label of a field changes. |
RESOURCE_RENDERED | Fired when the image resource of a Generic Image or Canvas is rendered. |
MODEL_VALIDATION_CHANGE | Fired every time the validation state of a model changes. |
Property names
Used as the prop parameter in setFieldValue and ScriptApiClearOptions.
| Value | Applicable field types |
|---|---|
value | All |
code | DV_CODED_TEXT, GENERIC_CODED_TEXT, DV_ORDINAL, GENERIC_ORDINAL, DV_SCALE |
magnitude | DV_QUANTITY, GENERIC_QUANTITY |
unit | DV_QUANTITY, GENERIC_QUANTITY |
denominator | DV_PROPORTION, GENERIC_PROPORTION_FIELD |
numerator | DV_PROPORTION, GENERIC_PROPORTION_FIELD |
label | DV_CODED_TEXT, GENERIC_CODED_TEXT, DV_ORDINAL, GENERIC_ORDINAL, DV_SCALE |
ordinal | DV_ORDINAL, GENERIC_ORDINAL |
scale | DV_SCALE |
otherValue | DV_CODED_TEXT, GENERIC_CODED_TEXT |
other | DV_CODED_TEXT, GENERIC_CODED_TEXT |
id | DV_IDENTIFIER |
type | DV_IDENTIFIER |
issuer | DV_IDENTIFIER |
assigner | DV_IDENTIFIER |
year | DV_DURATION |
month | DV_DURATION |
week | DV_DURATION |
day | DV_DURATION |
hour | DV_DURATION |
minute | DV_DURATION |
second | DV_DURATION |
Container button positions
| Value | Description |
|---|---|
top | Positions the button at the top of the container. |
bottom | Positions the button at the bottom of the container. |
Variable types
| Value | Description |
|---|---|
number | The variable is of type number. |
string | The variable is of type string. |
array | The variable is of type array. |
object | The variable is of type object. |
boolean | The variable is of type boolean. |
Variable sources
| Value | Description |
|---|---|
STATIC | The variable value is static. |
EXTERNALLY_PROVIDED | The variable value is provided by the embedding application. |
PREDEFINED | The variable value is predefined by the system. |
API | The variable value comes from an API call. |
AQL | The variable value comes from an AQL query. |
Variable creation types
| Value | Description |
|---|---|
manually | The variable was created manually. |
automatic | The variable was created automatically. |
Frequently asked questions (FAQs)
Where do I use event types?
Event types are used as the eventType parameter in addListener and removeListener. They specify which field-level event the listener should respond to.
Where do I use property names?
Property names are used as the prop parameter in setFieldValue and in ScriptApiClearOptions. They specify which property of a field to read or modify.