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. Select the function in a condition or an action.
- Choose
- Reads input data that contains multiple values and selects the value at the position that you specify. Select the function in a condition or an action.
- 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.
- Convert to Date
- Converts a date value in an input string to a date/time data type. The function returns the month, day, and year. You select the date format when you configure the function. Select the function in an action.
- Concatenate
- Reads two inputs that you select and concatenates the values from the inputs. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- Lower
- Reads an input string and identifies the lowercase version of the characters in the string. Select the function in a condition.
- Null
- Reads an input value and determines if the value is null. Select the function in a condition or an action.
- Replace Character
- Reads an input value and replaces a sequence of characters in the value with a sequence that you specify. Select the function in a condition.
- Replace String
- Reads an input value and replaces the value with a value that you specify. Select the function in a condition.
- Reverse
- Reads an input value and reverses the characters in the value. Select the function in a condition or an action.
- 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. Select the function in a condition or an action.
- Upper
- Reads an input string and identifies the uppercase version of the characters in the string. Select the function in a condition.
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 |