Script Methods for Field Formats
The following are basic methods provided for all field formats A scripting component that can be used to retrieve the values of a field's formatting and positioning properties.. Some field formats may have additional methods.
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 |
---|---|---|
getFormatType() |
String |
The type of the format. Example var type = fieldFormat.getFormatType(); |
getTop() |
Integer |
The location of the top coordinate at 0 degrees rotation. Value: Thousandths of an inch (mil) Example var top = fieldFormat.getTop(); Note: To change this location and move the field, use a method with a name beginning with move. |
getBottom() |
Integer |
The location of the bottom coordinate at 0 degrees rotation. Units: Thousandths of an inch (mil) Example var bottom = fieldFormat.getBottom(); Note: To change this location and move the field, use a method with a name beginning with move. |
getLeft() |
Integer |
The location of the left coordinate at 0 degrees rotation. Units: Thousandths of an inch (mil) Example var left = fieldFormat.getLeft(); Note: To change this location and move the field, use a method with a name beginning with move. |
getRight() |
Integer |
The location of the right coordinate at 0 degrees rotation. Units: Thousandths of an inch (mil) Example var right = fieldFormat.getRight(); Note: To change this location and move the field, use a method with a name beginning with move. |
getHeight() |
Integer |
The height of the field. Units: Thousandths of an inch (mil) Example var height = fieldFormat.getHeight(); |
getWidth() |
Integer |
The width of the field. Units: Thousandths of an inch (mil) Example var width = fieldFormat.getWidth(); |
getRotation() setRotation(degree) |
Integer |
The rotational position of the field. Units: Degrees, 0 to 359 Example var rotation = fieldFormat.getRotation(); |
getRotatedTop() |
Integer |
The top coordinate at the rotated angle. This point may not reside on the field if the angle is something other than 0, 90, 180, or 270 degrees. Units: Thousandths of an inch (mil) |
getRotatedLeft() |
Integer |
The left coordinate at the rotated angle. This point may not reside on the field if the angle is something other than 0, 90, 180, or 270 degrees. Units: Thousandths of an inch (mil) |
getCenterX() |
Integer |
The horizontal center of the field. Units: Thousandths of an inch (mil) |
getCenterY() |
Integer |
The vertical center of the field. Units: Thousandths of an inch (mil) |
isVisible() setVisible(boolean) |
Boolean |
Whether the field is visible. Example var visible = fieldFormat.isVisible(); |
isFlipHorizontal() setFlipHorizontal(boolean) |
Boolean |
Whether the field is flipped horizontally. Example var flipped = fieldFormat.isFlipHorizontal(); |
getForegroundColor () |
Color |
The color for the foreground color property. This color cannot be replaced, but can be modified. Example var color = Field.getForegroundColor(); |
getBackgroundColor () |
Color |
The color for the background color property. This color cannot be replaced, but can be modified. Example var color = Field.getBackgroundColor(); |
getFormatter() |
Formatter |
The formatter property. This property cannot be replaced, but can be modified. Example var fmt = fieldFormat.getFormatter(); |
moveFromTopLeft(top,left) |
|
Reposition the field based on the top and left coordinates. Units: Thousandths of an inch (mil) Example Field.moveFromTopLeft(200,300); Note: For barcodes this moves the barcode and human readable text together. Use field format move if each should move independently. |
moveFromCenter(centerx,centery) |
|
Reposition the field based on the center coordinates. Units: Thousandths of an inch (mil) Example Field.moveFromCenter(200,300); |
moveGroupFromCenter(centerx,centery) |
Reposition a barcode and human readable text field based on the center coordinates. The position is based on the barcode only. The human readable text position is changed relative to the barcode's position. Example Field.moveGroupFromCenter(3000,3000); Note: For barcodes this moves the barcode and human readable text together. Use field format move if each should move independently. |
|
moveFromCenter(centerx,centery,rotation) |
|
Reposition the field based on the center coordinates. The rotation passed in is the final rotation expected for the object. Units: Thousandths of an inch (mil) Example Field.moveFromCenter(200,300,0); |
moveGroupFromCenter (centerx,centery,rotation) |
Reposition a barcode and human readable text field based on the center coordinates. The rotation is based on the rotation of the barcode only. The human readable text rotation is changed relative to this rotation. Example Field.moveGroupFromCenter(3000, 3000,90); Note: For barcodes this moves the barcode and human readable text together. Use field format move if each should move independently. |