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.

An expression can call most built-in functions. However, a function cannot call itself or call another function that leads to a recursive call.
The following table describes each built-in function. Use the features in the table to view functions: Hide select columns, organize columns in ascending or descending order, and search for terms.

Function

Option

Category

Description

abs

Absolute

Math

Returns the absolute value of an input number.

add_months

Add months

Date

Adds a given number of months to a date.

concat_date_time

Concat date time

Date

Returns a datetime from separate date and time inputs.

date_diff

Date difference

Date

Returns the difference between two dates or times.

date_part

Date part

Date

Extracts a component of a given date.

day_in_month

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

Day in week

Date

Determines the day in the week on which the given date falls.

day_in_year

Day in year

Date

Determines the day in the year on which the given date falls.

decode

Decode

Lookup

Returns an expression based on the first condition in the specified list that evaluates to TRUE.

exists

Exists

Lookup

Checks if a row exists that matches the provided filter expression and column.

fiscal_day

Fiscal day

Date

Converts a given date into an integer value representing a day in a fiscal year.

isweekend

Is weekend

Date

Indicates whether a date corresponds to Saturday or Sunday.

is_data_dependent

Is data dependent

Lookup

Checks the data dependencies between primary and dependent columns.

is_unique

Is unique

Lookup

Checks the data dependencies between primary and dependent columns.

is_valid_date

Is valid date

Validation

Indicates whether an expression can be converted into a valid calendar date value.

is_valid_datetime

Is valid datetime

Validation

Indicates whether an expression can be converted into a valid datetime value.

is_valid_decimal

Is valid decimal

Validation

Indicates whether an expression can be converted into a valid decimal value.

is_valid_double

Is valid double

Validation

Indicates whether an expression can be converted into a valid double value.

is_valid_int

Is valid int

Validation

Indicates whether an expression can be converted into a valid integer value.

is_valid_real

Is valid real

Validation

Indicates whether an expression can be converted into a valid real value.

is_valid_time

Is valid time

Validation

Indicates whether an expression can be converted into a valid time value.

julian

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

Julian to date

Conversion

Converts a Julian value to a date.

last_date

Last date of month

Date

Returns the last date of the month for a given date.

length

String length

String

Returns the number of characters in a given string.

lookup

Lookup value

Lookup

Returns the values looked up from the database, SAP application, or views.

lower

To lower case

String

Changes the characters in a string to lowercase.

lpad

Left pad

String

Pads a string with characters from a specified pattern.

lpad_ext

Left pad logical

String

Pads a string with logical characters from a specified pattern.

ltrim

Left trim

String

Removes specified characters from the start of a string.

match_pattern

Match pattern

String

Matches whole input strings to simple patterns supported by this application. This function does not match substrings.

match_regex

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.

mod

Modulo

Math

Returns the remainder when one number is divided by another.

month

Month

Date

Determines the month of the given date.

nvl

Replace null

Lookup

Replaces NULL values.

quarter

Quarter

Date

Determines the quarter in which the given date falls.

replace_substr

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

Round

Math

Rounds a given number to the specified precision.

rpad

Right pad

String

Pads a string with characters from a specified pattern.

rpad_ext

Right pad logical

String

Pads a string with logical characters from a specified pattern.

rtrim

Right trim

String

Removes specified characters or blank characters from the end of a string.

soundex

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.

sqrt

Square root

Math

Returns the square root of the given expression.

substr

Substring

String

Returns a specific portion of a string starting at a given point in the string.

sysdate

System date

Date

Returns the current date as listed by the operating system.

systime

System time

Time

Returns the current time as listed by the operating system.

to_char

Convert to char

Conversion

Converts a date or numeric data type to a string.

to_date

Convert to date

Conversion

Converts a string to a date.

to_decimal

Convert to decimal

Conversion

Converts a string to a decimal, with an optional precision parameter.

trunc

Truncate

Math

Truncates a given number to the specified precision, without rounding the value.

upper

To upper case

String

Changes the characters in a string to uppercase.

week_in_month

Week in month

Date

Determines the week in the month in which the given date falls.

week_in_year

Week in year

Date

Returns the week in the year in which the given date falls.

word

Word in string

String

Returns the word identified by its position in a delimited string.

year

Year

Date

Determines the year in which the given date falls.