Functions
A function takes input, such as values from a column, and produces a return value.
Use built-in functions when you create filters and define rules. Use the Advanced Editor to either manually type the built-in function, or click the Functions button to view the list of categories and functions. The functions are available when creating or editing conditions and filters in rules.
When you use the Advanced Editor, select a function from the category list. Hover over a function, and a tooltip opens to assist you in completing the function you chose. The function is inserted at the current position within the rule script editor.
|
Function |
Option |
Category |
Description |
|---|---|---|---|
|
Absolute |
Math |
Returns the absolute value of an input number. |
|
|
Add months |
Date |
Adds a given number of months to a date. |
|
|
Concat date time |
Date |
Returns a datetime from separate date and time inputs. |
|
|
Date difference |
Date |
Returns the difference between two dates or times. |
|
|
Date part |
Date |
Extracts a component of a given date. |
|
|
Day in month |
Date |
Determines the day in the month on which the given date falls. Result is the number from 1 to 31 that represents the day in the month. |
|
|
Day in week |
Date |
Determines the day in the week on which the given date falls. |
|
|
Day in year |
Date |
Determines the day in the year on which the given date falls. |
|
|
Decode |
Lookup |
Returns an expression based on the first condition in the specified list that evaluates to TRUE. |
|
|
Exists |
Lookup |
Checks if a row exists that matches the provided filter expression and column. |
|
|
Fiscal day |
Date |
Converts a given date into an integer value representing a day in a fiscal year. |
|
|
Is weekend |
Date |
Indicates whether a date corresponds to Saturday or Sunday. |
|
|
Is data dependent |
Lookup |
Checks the data dependencies between primary and dependent columns. |
|
|
Is unique |
Lookup |
Checks the data dependencies between primary and dependent columns. |
|
|
Is valid date |
Validation |
Indicates whether an expression can be converted into a valid calendar date value. |
|
|
Is valid datetime |
Validation |
Indicates whether an expression can be converted into a valid datetime value. |
|
|
Is valid decimal |
Validation |
Indicates whether an expression can be converted into a valid decimal value. |
|
|
Is valid double |
Validation |
Indicates whether an expression can be converted into a valid double value. |
|
|
Is valid int |
Validation |
Indicates whether an expression can be converted into a valid integer value. |
|
|
Is valid real |
Validation |
Indicates whether an expression can be converted into a valid real value. |
|
|
Is valid time |
Validation |
Indicates whether an expression can be converted into a valid time value. |
|
|
Julian value |
Date |
Converts a date to its integer Julian value, which is a six-digit number. The number represents a date between 1 January 1900 to 31 December 2899. |
|
|
Julian to date |
Conversion |
Converts a Julian value to a date. |
|
|
Last date of month |
Date |
Returns the last date of the month for a given date. |
|
|
String length |
String |
Returns the number of characters in a given string. |
|
|
Lookup value |
Lookup |
Returns the values looked up from the database, SAP application, or views. |
|
|
To lower case |
String |
Changes the characters in a string to lowercase. |
|
|
Left pad |
String |
Pads a string with characters from a specified pattern. |
|
|
Left pad logical |
String |
Pads a string with logical characters from a specified pattern. |
|
|
Left trim |
String |
Removes specified characters from the start of a string. |
|
|
Match pattern |
String |
Matches whole input strings to simple patterns supported by this application. This function does not match substrings. |
|
|
Match regular expression |
String |
Matches whole input strings to the pattern that you specify with regular expressions and flags. The regular expressions are based on the POSIX standard. The match_regex function does not match substrings. |
|
|
Modulo |
Math |
Returns the remainder when one number is divided by another. |
|
|
Month |
Date |
Determines the month of the given date. |
|
|
Replace null |
Lookup |
Replaces NULL values. |
|
|
Quarter |
Date |
Determines the quarter in which the given date falls. |
|
|
Replace substring |
String |
Returns a string where every occurrence of a given search string in the input is substituted by the given replacement string. |
|
|
Round |
Math |
Rounds a given number to the specified precision. |
|
|
Right pad |
String |
Pads a string with characters from a specified pattern. |
|
|
Right pad logical |
String |
Pads a string with logical characters from a specified pattern. |
|
|
Right trim |
String |
Removes specified characters or blank characters from the end of a string. |
|
|
Soundex |
String |
Encodes the input string using the Soundex algorithm and returns a string. Use this function when you want to push down the function to the database level. |
|
|
Square root |
Math |
Returns the square root of the given expression. |
|
|
Substring |
String |
Returns a specific portion of a string starting at a given point in the string. |
|
|
System date |
Date |
Returns the current date as listed by the operating system. |
|
|
System time |
Time |
Returns the current time as listed by the operating system. |
|
|
Convert to char |
Conversion |
Converts a date or numeric data type to a string. |
|
|
Convert to date |
Conversion |
Converts a string to a date. |
|
|
Convert to decimal |
Conversion |
Converts a string to a decimal, with an optional precision parameter. |
|
|
Truncate |
Math |
Truncates a given number to the specified precision, without rounding the value. |
|
|
To upper case |
String |
Changes the characters in a string to uppercase. |
|
|
Week in month |
Date |
Determines the week in the month in which the given date falls. |
|
|
Week in year |
Date |
Returns the week in the year in which the given date falls. |
|
|
Word in string |
String |
Returns the word identified by its position in a delimited string. |
|
|
Year |
Date |
Determines the year in which the given date falls. |