Calculated Fields - Supported Functions
The below table explains in detail the functions that can be used to create calculated fields. The functions are divided into 4 categories
Numeric Functions
For parameters required by the functions,
Is Mandatory?: Indicates whether the parameter is mandatory or not. If the value is mandatory and a value isn’t provided for the parameter, the add-on will throw an error
Is Variable Length?: The value ‘No’ indicates that parameter takes single value. Variable length indicates, the parameter can take multiple values. You can use "Add parameter" link to add more values
|
|
| Parameters | |||
---|---|---|---|---|---|---|
Name: Description | Type | Is Mandatory? | Is Variable Length? | |||
ADD - Returns the sum of all the numbers given as parameters | Numeric | ADD(8, 101.4) = 109.4 | value1: Initial Value | Numeric | Yes | No |
value2: Value to be added | Numeric | Yes | Yes | |||
SUBTRACT - Returns the difference between provided numbers | Numeric | SUBTRACT(101.4, 1.4) = 100 | value1: Initial value | Numeric | Yes | No |
value2: Value to be subtracted | Numeric | Yes | No | |||
MULTIPLY - Returns the product of all the numbers given as parameters | Numeric | MULTIPLY(10, 1.1) = 11 | value: Initial value | Numeric | Yes | No |
multiplier: Value to be multiplied | Numeric | Yes | Yes | |||
DIVIDE - Returns the quotient after a number is divided by a divisor | Numeric | DIVIDE(15, 3) = 5, | value: Initial value | Numeric | Yes | No |
divisor: Value to divide by | Numeric | Yes | No | |||
MOD - Returns the remainder after a number is divided by a divisor | Numeric | MOD(15, 3) = 0 | value: Initial value | Numeric | Yes | No |
divisor: Value to divide the initial value by | Numeric | Yes | No | |||
ROUND - Returns the value of number rounded to the nearest Integer | Numeric | ROUND(100) = 100 | value: Initial value | Numeric | Yes | No |
FLOOR - Returns the largest Integer value that is less than or equal to the parameter | Numeric | FLOOR(10) = 10 | value: Initial value | Numeric | Yes | No |
CEILING - Returns the smallest Integer value that is greater than or equal to the parameter | Numeric | CEILING(10) = 10 | value: Initial value | Numeric | Yes | No |
ABS - Returns the absolute value of the parameter | Numeric | ABS(10.1) = 10.1 | value: Initial value | Numeric | Yes | No |
TO NUMBER - Returns Number value represented by the input string | Numeric | TO NUMBER('-10.1') = -10.1 | value: Initial value | Numeric | Yes | No |
LESS THAN - Returns TRUE if value1 is less than value2. Otherwise returns FALSE | Boolean | LESS THAN(10.0, 10) = FALSE | value1: Initial value | Numeric | Yes | No |
value2: Value to be compared against | Numeric | Yes | No | |||
LESS THAN OR EQUALS - Returns TRUE if value1 is less than or equal to value2. Otherwise returns FALSE | Boolean | LESS THAN OR EQUALS(10.0, 10) = TRUE | value1: Initial value | Numeric | Yes | No |
value2: Value to be compared against | Numeric | Yes | No | |||
GREATER THAN - Returns TRUE if value1 is greater than value2. Otherwise returns FALSE | Boolean | GREATER THAN(10.0, 10) = FALSE | value1: Initial value | Numeric | Yes | No |
value2: Value to be compared against | Numeric | Yes | No | |||
GREATER THAN OR EQUALS - Returns TRUE if value1 is greater than or equal to value2. Otherwise returns FALSE | Boolean | GREATER THAN OR EQUALS(10.0, 10) = TRUE | value1: Initial value | Numeric | Yes | No |
value2: Value to be compared against | Numeric | Yes | No |
String Functions
For parameters required by the functions,
Is Mandatory?: Indicates whether the parameter is mandatory or not. If the value is mandatory and a value isn’t provided for the parameter, the add-on will throw an error
Is Variable Length?: The value ‘No’ indicates that parameter takes single value. Variable length indicates, the parameter can take multiple values. You can use "Add parameter" link to add more values
Function Name & Description | Return Type | Examples | Parameters | |||
---|---|---|---|---|---|---|
Name: Description | Type | Is Mandatory? | Is Variable Length? | |||
CONCAT - Concatenates the provided string values into a single string | String | CONCAT('Join', ' ', 'these', ' ', 'words') = 'Join these words' | value1: Initial value | String | Yes | No |
value2: Value to be concatenated to the initial value | String | Yes | Yes | |||
SUBSTRING - Returns the substring of the value. Substring starting at startPos, till endPos (if provided, otherwise, till end of the value) is returned. If negative values are used for position index, then index calculation is done from right. Value of -1, will point to the first character on the right. | String | SUBSTRING('The fox jumped over the fence', 0) = 'The fox jumped over the fence' SUBSTRING('The fox jumped over the fence', 0, 10) = 'The fox ju' SUBSTRING('The fox jumped over the fence', 10, 20) = 'mped over ' SUBSTRING('The fox jumped over the fence', 10, 100) = 'mped over the fence' SUBSTRING('The fox jumped over the fence', -10) = ' the fence' SUBSTRING('The fox jumped over the fence', -10, 25) = ' the f' SUBSTRING('The fox jumped over the fence', 0, -10) = 'The fox jumped over' SUBSTRING('The fox jumped over the fence', 30, 40) = '' SUBSTRING(NULL, 30, 40) = NULL | value: Initial value | String | Yes | No |
startPos: Character position which will be start of extracted substring | Numeric | Yes | No | |||
endPos: Character position till which the substring will be extracted. | Numeric | No | No | |||
UPPER - Returns the value with all alphabets converted to Upper Case | String | UPPER('this is all lower') = 'THIS IS ALL LOWER' | value: Initial value | String | Yes | No |
LOWER - Returns the value with all alphabets converted to Lower Case | String | LOWER('THIS IS ALL UPPER') = 'this is all upper' | value: Initial value | String | Yes | No |
TO STRING - Returns the String value of passed parameter. Useful for converting Numeric, Date or Boolean value to String. | String | TO STRING(100.01) = '100.01' | value: Initial value | ANY | Yes | No |
LENGTH - Returns the length of provided string value | Numeric | LENGTH('This is a string value') = 22 | value: Initial value | String | Yes | No |
POSITION - Returns the position of first occurrence of searchString in the value. Return value of -1, indicates that searchString was not found in the initial value. If negative values are used for position index, then index calculation is done from right. Value of -1, will point to the first character on the right. | Numeric | POSITION('This is a string value', 'This') = 0 | value: Initial value | String | Yes | No |
searchString: String to be searched in the initial value | String | Yes | No | |||
startPos: Character position from which search will be performed. | Numeric | No | No | |||
CONTAINS - Returns TRUE if the searchString is contained in the value. Otherwise returns FALSE | Boolean | CONTAINS('This is a string value', 'is') = TRUE | value: Initial value | String | Yes | No |
searchString: String to be searched in the initial value | String | Yes | No | |||
IN - Returns TRUE if the value is contained in the List. Otherwise returns FALSE | Boolean | IN('OPEN', 'TO DO', 'OPEN', 'IN PROGRESS') = TRUE | value: Initial value | String | Yes | No |
listItem: List in which the initial value is be searched | String | Yes | Yes |
Date Functions
For parameters required by the functions,
Is Mandatory?: Indicates whether the parameter is mandatory or not. If the value is mandatory and a value isn’t provided for the parameter, the add-on will throw an error
Is Variable Length?: The value ‘No’ indicates that parameter takes single value. Variable length indicates, the parameter can take multiple values. You can use "Add parameter" link to add more values
For functions returning dates:
Date value is automatically converted to Logged-in users timezone. For ex: NOW()
Date value displayed in the report, will have a default format (MMM dd, yyyy) applied. This format can be changed from the field settings in the Report page
Date Functions
For parameters required by the functions,
Is Mandatory?: Indicates whether the parameter is mandatory or not. If the value is mandatory and a value isn’t provided for the parameter, the add-on will throw an error
Is Variable Length?: The value ‘No’ indicates that parameter takes single value. Variable length indicates, the parameter can take multiple values. You can use "Add parameter" link to add more values
Function Name & Description | Return Type | Examples | Parameters | |||
---|---|---|---|---|---|---|
Name: Description | Type | Is Mandatory? | Is Variable Length? | |||
FORMAT DATE - Returns the formatted date as per selected Pattern | String | NOW() = '2019-04-11T12:02:53.854+0530' | date: Initial value | Date | Yes | No |
pattern: Pattern value to be used to format the date | String | Yes | No | |||
DAYS - Returns the days between provided date values | Numeric | NOW() = '2019-04-11T14:02:25.000+0530' Note: For the examples the date value is shown without any format | aDate: Initial value | Date | Yes | No |
bDate: Number of days will be calculated between this value and the initial value | Date | Yes | No | |||
BUSINESS DAYS - Returns the business days between provided date values. | Numeric | NOW() = '2019-04-11T14:08:47.225+0530' Note: For the examples the date value is shown without any format | aDate: Initial value | Date | Yes | No |
bDate: Number of business days will be calculated between this value and the initial value | Date | Yes | No | |||
NOW - Returns the current date and time value | Date | NOW() = '2019-04-11T12:02:53.854+0530' | None | N/A | N/A | N/A |
IS BEFORE - Returns TRUE if the aDate is chronologically before bDate. Otherwise returns FALSE | Boolean | NOW() = '2019-04-11T12:02:53.854+0530' | aDate: Initial value | Date | Yes | No |
bDate: Date against which the initial value will be compared | Date | Yes | No | |||
IS AFTER - Returns TRUE if the aDate is chronologically after bDate. Otherwise returns FALSE | Boolean | NOW() = '2019-04-11T12:02:53.854+0530' | aDate: Initial value | Date | Yes | No |
bDate: Date against which the initial value will be compared | Date | Yes | No |
Logical Functions
For parameters required by the functions,
Is Mandatory?: Indicates whether the parameter is mandatory or not. If the value is mandatory and a value isn’t provided for the parameter, the add-on will throw an error
Is Variable Length?: The value ‘No’ indicates that parameter takes single value. Variable length indicates, the parameter can take multiple values. You can use "Add parameter" link to add more values
Function Name & Description | Return Type | Examples | Parameters | |||
---|---|---|---|---|---|---|
Name: Description | Type | Is Mandatory? | Is Variable Length? | |||
EQUALS - Returns TRUE if value1 is equal to value2, otherwise returns FALSE | Boolean | EQUALS('Hello', 'hello') = FALSE | value1: Initial value | ANY | Yes | No |
value2: Value to be compared with the initial value | ANY | Yes | No | |||
NOT EQUALS - Returns TRUE if value1 is not equal to value2, otherwise returns FALSE | Boolean | NOT EQUALS('Hello', 'hello') = TRUE | value1: Initial value | ANY | Yes | No |
value2: Value to be compared with the initial value | ANY | Yes | No | |||
AND - Returns the value with ANDing of all parameters. Returns FALSE if any one the parameter is FALSE. Otherwise returns TRUE | Boolean | AND(TRUE, TRUE) = TRUE | value1: Initial value | Boolean | Yes | No |
value2: Value to be ANDed with the initial value | Boolean | Yes | Yes | |||
OR - Returns the value with ORing of all parameters. Returns TRUE if any one of the parameter is TRUE. Otherwise returns FALSE | Boolean | OR(TRUE, TRUE) = TRUE | value1: Initial value | Boolean | Yes | No |
value2: Value to be ORed with the initial value | Boolean | Yes | Yes | |||
NOT - Returns the negated value of parameter. Returns FALSE for TRUE value, and vice versa | Boolean | NOT(TRUE) = FALSE | value: Initial value | Boolean | Yes | No |
TRUE - Returns TRUE value | Boolean | TRUE() = TRUE | None | N/A | N/A | N/A |
FALSE - Returns FALSE value | Boolean | FALSE() = FALSE | None | N/A | N/A | N/A |
IF ELSE - Returns the value1 if condition is TRUE, otherwise returns value2 | ANY | IF ELSE(CONTAINS('The fox jumped over the fence', 'over'), 'Present', 'Absent') = 'Present' | condition: Condition to determine which value to return | Boolean | Yes | No |
value1: Value to be returned if condition evaluates to TRUE | ANY | Yes | No | |||
value2: Value to be returned if condition evaluates to FALSE | ANY | Yes | No | |||
IF NULL - Returns value1 if it is not null, otherwise returns value2. | ANY | IF NULL(100, 200) = 100 | value1: Initial value | ANY | Yes | No |
value2: Value to be returned if initial value is NULL | ANY | Yes | No | |||
COALESCE - Returns the first value which is not null. | ANY | COALESCE(100, 200, NULL, 300, NULL, 500) = 100 | value1: Initial value | ANY | Yes | No |
value2: Value to be returned if previous parameter values are NULL | ANY | Yes | Yes |