Create a script for a transform definition
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- Platform Field Administration
Create the script at any time during the configuration of a definition.
About this task
The script can perform a transform action without using a variable, but the action of the definition will be the same for all fields. Variables create more flexibility for the definition, enabling an administrator to use the same definition in different ways in different places. If a variable is defined, the script must reference the variable using the correct format.
- Variables: Contains the variables using the format variables.<variable name>.
- Value: Contains the un-transformed value
- Parameters: Special objects that set debug messages.
All position parameters (such as Starting position and Ending position) have three modes that apply to all the transform types that use this variable.
Positive positions | If the position is expressed as a positive integer, the platform calculates the starting position beginning from the left side of the field value. For example, in the string ABCDE, a position of 3 places the starting point of the action after C. |
Negative positions | If the position is expressed as a negative integer, the platform calculates the position beginning from the right side of the field value. For example, in the string ABCDE, a position of -3 places the starting point of the action before C. |
Regex | If the position value starts with /regex/, everything after that is a regular expression that is used to calculate the starting position. For example, in the string ABCDE, a position of /regex/B.*D places the starting point of the action after C (B and all the characters between B and D). |
Procedure