Function Descriptions
A function is a logical element in a condition or an action. A function reads the input data that you specify, performs a calculation on the input data, and returns a result.
When you add a function to a condition, the function performs the calculation and returns the result to the condition. The condition uses the rule statement operator to determine the next step. When you add a function to an action, the action performs the calculation and returns the result as the rule statement output.
You can select the following functions in a condition or an action:
- Add to Date
- Reads a date value and adds a numeric value to an element in the date. Enter the value to add to the element, or select a rule set input that contains the value to add.
- Choose
- Reads input data that contains multiple values and selects the value at the position that you specify.
- For example, the following string contains values at four positions:
Q1, Q2, Q3, Q4
- You can enter a position, or you can select a rule set input to specify a position.
- Concatenate
- Reads two inputs that you select and concatenates the values from the inputs.
- Date Difference
- Reads date values from two inputs that you select and calculates the numeric difference between the dates. You select the date element that the function uses to measure the difference. Enter the date element, or select a rule set input that contains the date element.
- Date Part
- Reads a date from an input and identifies the numeric value of a date element that you specify. Enter the date element, or select a rule set input that contains the date element.
- Date Time
- Uses multiple values to specify a date and time. Enter a value for each date element, or select a rule set input to add a value to each element.
- Greatest
- Reads two or more values and identifies the highest value. Enter the values, or select rule set inputs to add each value. You can specify numeric values, alphabetic values, or date values. Specify a single type of value.
- When you specify numeric values, the function identifies the highest number.
- When you specify alphabetic values, the function identifies the value that is last in alphabetic order.
- When you specify date values, the function identifies the latest date.
- Last Day
- Reads a date value from an input and identifies the last day in the month that the date specifies. The function identifies the last day as a numeric value.
- Least
- Reads two or more values and identifies the lowest value. Enter the values, or select rule set inputs to add each value. You can specify numeric values, alphabetic values, or date values. Specify a single type of value.
- When you specify numeric values, the function identifies the lowest number.
- When you specify alphabetic values, the function identifies the value that is first in alphabetic order.
- When you specify date values, the function identifies the earliest date.
- Length
- Reads an input value and calculates the number of characters in the value.
- Lower
- Reads an input string and identifies the lowercase version of the characters in the string.
- Null
- Reads an input value and determines if the value is null.
- Replace Character
- Reads an input value and replaces a sequence of characters in the value with a sequence that you specify.
- Replace String
- Reads an input value and replaces the value with a value that you specify.
- Reverse
- Reads an input value and reverses the characters in the value.
- Truncate
- Reads an input value and truncates the value to the number of places that you specify. The function reads a numeric value. Enter the value, or select a rule set input to add the value. You can also enter the number of places to truncate, or select a rule set input to specify the number of places.
- Upper
- Reads an input string and identifies the uppercase version of the characters in the string.
Date Elements in Functions
When you add a date element to a function, enter the function in the format that the function recognizes.
The following table describes the date formats to use:
Date Element | Format |
---|
Year | yyyy |
Month | MM |
Day | dd |
Hour | hh |
Minute | mm |
Second | ss |
Millisecond | SSS |