Assigning values using function results
AR System supports a set of functions that you can use in the Set Fields action. The functions enable you to manipulate data so that you can control aspects of values that you are loading into fields. For example, you can use the UPPER function to convert an ASCII string loaded in a field to uppercase.
To use a function in a Set Fields operation
- Create a Set Fields action as described in "To use the CURRENT SCREEN or CURRENT TRANSACTION data source" in Creating-a-Set-Fields-action, but enter information in the Name and Value fields as follows:
- From the Name list, select the field that you are setting with this action.
- From the Value list, click Functions to display a list of available functions.
Functions describe each function that AR System supports.
- Select the appropriate function.
The function appears in the field with a set of parentheses to its right. - For the selected function, enter the arguments within the parentheses.
Functions describe each function that AR System supports. Repeat steps 1 through 4 for each field that you want to set with a function.
If the value of any of the arguments of a function is NULL, the result of the function is NULL (the field is empty). To avoid this result, use a qualification that verifies the operation and includes a value for all arguments. For filters and escalations, if you use an empty field as a parameter in a function, it is considered a NULL value. The exception to this rule is the third parameter for the REPLACE function. If the third parameter is NULL, it is interpreted as an empty string.
Specifying arguments that use a comma as a decimal separator
Specifying arguments that use a comma as a decimal separator (in a German locale, for example) requires special consideration for the following functions:
- LPAD
- RPAD
- MAX
- MIN
- SUBSTR
To specify an argument that uses a comma as a decimal separator
- Use a hidden, read-only field, and assign a default value to it.
- Use the appropriate field keywords as arguments.
For example, instead of using SUBSTR($Character Field$, 56, 65) use SUBSTR($Character Field$, $Integer1$, $Integer2$) where Integer1 and Integer2 are hidden, read-only fields with default values of 56 and 65 assigned to them. Functions list the functions you can use in a Set Fields action.