The script is written in JavaScript. The script shows how to access context variables, such as the list box attribute name, ancestors in the dependency chain, and so on, that are passed to it and how to return results.
Information is passed to the script using the pre-defined variables. The following variable names are reserved and cannot be redefined by the script writer.
Reserved Variable | Type | Contents |
---|---|---|
ancestors | Map | Name and value information for parent, grandparent, and so on |
attributeName | String | Attribute name for which values are to be retrieved |
database | String | Database path to which the user is currently connected |
formType | String | Type of form the attribute is on. If the attribute is QUERY, then all results are returned. |
listboxDefault | String | Default list box value. For example, Any. |
log | ScriptLogger, which has the logMessage(string) method and the logMessage(Throwable) method | Allows the script to print to the event log |
results | List of Strings (starts empty) | Where the results of the script go |
userGroups | List of strings | List of groups of which the user is a member |
userName | String | Name of user trying to get the list box values |