Script Methods for Fields
The following are the basic methods provided for all fields. Each type of field may have additional methods provided.
Tip: If using these script methods in a business rule, select the Rhino script engine.
Tip: Script methods with names beginning with get or is retrieve the current value for a property. Script methods with names beginning with set or move configure a value for the property.
Method |
Value |
Description |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
getName() |
String |
The name of the field. Example var name = Field.getName(); |
||||||||||||||||
getType() |
String |
The type of the field. Accepted return values:
Example var type = Field.getType(); |
||||||||||||||||
getDataRef() setDataRef(String) |
String |
The alias of the field. This is not the fully qualified key. Examples var alias = Field.getDataRef(); Field.setDataRef("/myref"); |
||||||||||||||||
getFullyQualifiedKey() |
String |
The fully qualified key for the field.
Example var fqn = getFullyQualifiedKey(); |
||||||||||||||||
isVisible() setVisible(boolean) |
boolean |
Whether the field is visible. Example var visible = Field.isVisible(); Field.setVisible(true); |
||||||||||||||||
getFormatProxy() |
Field format object |
The field format object from the field. Example var format = Field.getFormatProxy(); |
||||||||||||||||
getDefaultData() setDefaultData(String) |
String |
The value of the default data. Examples var default = Field.getDefaultData(); Field.setDefaultData("newvalue"); |
||||||||||||||||
getPrintingValue(MAP) |
String |
The value that will be used for this field at print time. The data map Example var value = Field.getPrintingValue(MAP); |
||||||||||||||||
getData() setData(String) |
String |
The value of the current static data for the field. By default, the return value is null. setData() overrides the default data and the MAP values and sets the isDataSet flag to true. Examples Field.setData("myvalue"); Field.getData(); |
||||||||||||||||
clearData() |
Clear the static data from the field and reset the isDataSet flag to false. Example clearData(); |
|||||||||||||||||
isDataSet() |
boolean |
Whether the data has been statically set on the field. Example var set = Field.isDataSet(); |