FUNCTION | DESCRIPTION | SYNTAX | EXAMPLES |
Abs | Calculates the absolute value of a number. | Abs(number) | Abs(-5.5) returns 5.5; Abs(10) returns 10 |
Ceil | Rounds up to the nearest integer or higher. | Ceil(number) | Ceil(3.2) returns 4; Ceil(-2.8) returns -2 |
Floor | Rounds down to the nearest integer or lower. | Floor(number) | Floor(3.8) returns 3; Floor(-4.5) returns -5 |
Naturallog | Computes the natural logarithm of a number. | Naturallog(number) | Naturallog(10) returns 2.302 |
Base10log | Calculates the base 10 logarithm of a number. | Base10log(number) | Base10log(100) returns 2.0 |
Max | Finds the maximum value from a list of numbers. | Max(value1, value2,...) | Max(3,7,5,9) returns 9; Max(-2,0,-5,1) returns 1 |
Min | Finds the minimum value from a list of numbers. | Min(value1, value2,...) | Min(4,2,8,1) returns 1; Min(0.5,1,0.1,0.2) returns 0.1 |
Sqrt | Calculates the square root of a number. | Sqrt(number) | Sqrt(16) returns 4; Sqrt(25) returns 5 |
ToNumber | Converts the input to a number. | ToNumber(value) | ToNumber("42") returns 42; ToNumber("3.14") returns 3.14 |
| Round | Rounds a number to the nearest value based on the specified precision. | Round(number), Round(number, precision) | Round(7.6) returns 8; Round(-2.3) returns -2; Round(5.678, 2) returns 5.68 |
IsPositive | Checks if a given number is positive. | IsPositive(number) | IsPositive(456) # Returns True; IsPositive(-789) # Returns False |
IsNegative | Checks if a given number is negative. | IsNegative(number) | IsNegative(-345) # Returns True; IsNegative(123) # Returns False |
FUNCTION | DESCRIPTION | USAGE | EXAMPLES |
Len | Returns the number of characters in a specified text string. | Len(string) | Len('hello') returns 5; Len(' open ai ') returns 9 |
Find | Returns the index of the nth occurrence of a substring within another string. | Find('string', 'search string', number) | Find('bookshelf', 'o', 2) returns 6 |
Concat | Concatenates multiple strings into a single string. | Concat('string', 'string', ...) | Concat('First', 'Name') returns FirstName |
Contains | Checks if a string contains another string. | Contains('string', 'search string') | Contains('programming', 'gram') returns true |
Startswith | Checks if a string starts with another string. | Startswith('string', 'search string') | Startswith('hello', 'hi') returns false<br>Startswith('hello', 'hel') returns true |
Endswith | Checks if a string ends with another string. | Endswith('string', 'search string') | Endswith('apple', 'le') returns true<br>Endswith('apple', 'pl') returns false |
Lower | Converts all characters in a string to lowercase. | Lower('string') | Lower('HELLO') returns "hello"<br>Lower('HeLLo') returns "hello" |
Upper | Converts all characters in a string to uppercase. | Upper('string') | Upper('hello') returns "HELLO"<br>Upper('HeLLo') returns "HELLO" |
Trim | Removes leading and trailing whitespace from a string. | Trim('string') | Trim(' hello ') returns "hello" |
Substring | Returns a portion of a string starting from a specified position and with a specified length. | Substring('string', n1, n2) | Substring('programming', 5, 6) returns "am" |
Replace | Replaces occurrences of a substring within a string with another substring. | Replace('string', 'search string', 'replace string') | Replace('hello world', 'world', 'universe') returns "hello universe" |
Tostring | Converts any argument to a string data type. | Tostring(generic argument) | Tostring(3.14) returns "3.14"<br>Tostring('Hello') returns "Hello" |
IsEmpty | Checks whether a value is empty or not. | IsEmpty(generic) | IsEmpty('') returns true<br>IsEmpty('GPT') returns false<br>IsEmpty(${Product.Price}) returns true if Price is not entered |
CaseInsensitiveEquals | Compares two strings without considering case differences. | CaseInsensitiveEquals(string,string) | CaseInsensitiveEquals('hello', 'HeLLo') returns true; CaseInsensitiveEquals('world', 'worLd') returns true; CaseInsensitiveEquals('hello', 'world') returns false. |
FUNCTION | DESCRIPTION | USAGE | EXAMPLES |
Newdate | Creates a date from the provided year, month, day, hour, minute, and time indicator. | Newdate(year, month, day, hour, minute, 'string') | Newdate(2024, 5, 14, 9, 30, 'AM') returns "14/05/2024 09:30 AM" |
Datepart | Retrieves the date value from the given date-time expression. | Datepart(datetime argument) | Datepart(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "14/05/2024" |
Timepart | Retrieves the time value from the given date-time expression. | Timepart(datetime argument) | Timepart(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "09:30 AM" |
Adddate | Calculates a new date by adding a specified number of years, days, months, hours, or minutes to the given date. | Adddate(datetime, number, 'string') | Adddate(Newdate(2024, 5, 14, 9, 30, 'AM'), 3, 'DAY') returns "17/05/2024 09:30 AM" |
Subdate | Calculates a new date by subtracting a specified number of years, days, months, hours, or minutes from the given date. | Subdate(datetime, number, 'string') | Subdate(Newdate(2024, 5, 14, 9, 30, 'AM'), 2, 'YEAR') returns "14/05/2022 09:30 AM" |
Now | Returns the current date and time. | Now() | Now() returns the current date and time, e.g., "14/05/2024 10:15 AM" |
Datecomp | Compares two dates and returns the difference in minutes. | Datecomp(datetime, datetime) | Datecomp(Newdate(2024, 5, 14, 10, 0, 'AM'), Newdate(2024, 5, 14, 11, 0, 'AM')) returns 60.0 |
Dayofmonth | Retrieves the day of the month from the given date. | Dayofmonth(datetime) | Dayofmonth(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "14.0" |
Hour | Retrieves the hour from the given date. | Hour(datetime) | Hour(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "9.0" |
Minute | Retrieves the minute from the given date. | Minute(datetime) | Minute(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "30.0" |
Month | Retrieves the month from the given date. | Month(datetime) | Month(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "5.0" |
Year | Retrieves the year from the given date. | Year(datetime) | Year(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "2024.0" |
Weekday | Retrieves the day of the week (1-7) corresponding to the input date, where 1 is Sunday, 2 is Monday, and so on. | Weekday(datetime) | Weekday(Newdate(2024, 5, 14, 9, 30, 'AM')) returns "3.0". (This is because May 14th, 2024, is a Tuesday) |
DateBetween | Calculates the difference between two dates in the specified unit of time, which can be years, months, weeks, days, hours, or minutes. | DateBetween(date-time,date-time,string) | DateBetween(NewDate(2022, 02, 10, 11, 30, 'AM'), NewDate(2023, 02, 19, 11, 30, 'AM'), 'years') returns 1 |
FromTimestamp | Converts a given timestamp into a readable date and time format. | FromTimestamp(number) | FromTimestamp(1627843200) in IST returns "Aug 1, 2021, 12:00 PM". Note: The above example is for the IST timezone. The values will change based on the timezone of the user. |
Timestamp | Convert a specific date and time into a timestamp value. | Timestamp(date-time) | Timestamp(Newdate(2023,07,15,08,45,'PM')) in the IST timezone returns 1,255,403,500. Note: The above example is for the IST timezone. The values will change based on the timezone of the user. |
| Dayofweek | Returns the day of the week for a specified date | Dayofweek(date-time) | Dayofweek(Newdate(2024,07,07,06,15,'PM')) returns Sunday. |
Dayofyear | Calculates and returns the ordinal number of the day in the year for a given date | Dayofyear(date-time) | Dayofyear(Newdate(2023,12,31,08,15,'PM')) returns "365". |
FUNCTION | DESCRIPTION | USAGE | EXAMPLES |
If | Returns one of two values based on a logical condition. If the condition is true, returns the first value; otherwise, returns the second value. | If(Boolean, Generic, Generic) | If(5 > 3, "Yes", "No") returns "Yes"<br>If(5 < 3, "Yes", "No") returns "No" |
And | Returns true if all provided expressions are true; otherwise, returns false. | And(boolean, boolean ...) | And(2 > 1, 5 > 3, 7 < 8) returns "true"<br>And(2 > 1, 5 > 3, 7 > 8) returns "false" |
Or | Returns true if at least one of the provided expressions is true; otherwise, returns false. | Or(boolean, ...) | Or(2 > 1, 3 > 5, 7 > 8) returns "true"<br>Or(1 > 2, 3 > 5, 7 > 8) returns "false" |
Not | Returns the logical negation of the given expression. If the expression is true, returns false; if false, returns true. | Not(boolean) | Not(false) returns "true"<br>Not(true) returns "false" |