Object Editor Expressions
Expressions Supported by Data Object Editor for Conditions and Formulas.
Mathematical Operators:
+ Add
- Minus
* Multiply
/ Divide
General Operators
( ) Grouping operators (any level of nesting is supported), e.g. (amount + 10) * 2
Logical Operators
= Equals
== Equals
< Greater than
<= Greater than or equals to
> Less than
>= Less than or equals to
<> Not equals to
and e.g.: (price > 100) and (price <= 10000)
or Or
not Not or negate e.g.: not (price > 100)
Special Keywords
null - null value (e.g. data point that is not available in the data source)
undefined - undefined (e.g. divide by zero) or unassigned value
true - true value
false - false value
Mathematical Functions
Mod(n1, n2) - Modulus of n1 / n2. e.g. Mod(11,3) is 2
Abs(n) - Get the absolute value. e.g. Abs(-10) is 10
Round(n) - Round a value e.g. Round(10.56) is 11
Power(n1, n2) - Get n1 to the power n2. e.g. Power(10, 3) is 1000, Power(100,0.5) is 10
Conditional Functions
HasValue(v1) - Check if the value of v1 is not null nor undefined
ValOrDef(v1, defvaultValue) - Return the value of v1, if v1 is not null or undefiend. Return defvaultValue otherwise.
Date Related Functions
Date(year, month, day) - Define a new date. e.g. Date(2023, 12, 31)
ToDate(dateAsString) - Convert a string to date, e.g. ToDate("")
Year(date) - Get the year of a date
Month(date) - Get the month (as a number between 1 to 12) of the date
Day(date) - Get the day of the month
DayOfWeek(date) - Get the day of the week
Quarter(date) - Get the quarter of the year
AddToDate(date, years: nyears, months: nmonths, days: ndays) - Add years, months and days to the date. e.g. AddToDate(date, days: -1) returns yesterday.
String Processing Functions
StartsWith(mainString, subString) - Check if main string starts with the sub string, e.g. StartsWith( "ABCD", "AB") returns true.
StartsWith(mainString, subString, ignoreCase: true) - Check if main string starts with the sub string, ignoring case, e.g. StartsWith( "ABCD", "ab", ignoreCase: true) returns true.
EndsWith(mainString, subString) - Check if main string ends with the sub string, e.g. EndsWith( "ABCD", "CD") returns true.
EndsWith(mainString, subString, ignoreCase: true) - Check if main string ends with the sub string, ignoring case, e.g. StartsWith( "ABCD", "cd", ignoreCase: true) returns true.
Contains(mainString, subString) - Check if main string contains the sub string, e.g. Contains( "ABCD", "BC") returns true.
Contains(mainString, subString, ignoreCase: true) - Check if main string contains the sub string, ignoring case, e.g. Contains( "ABCD", "bc", ignoreCase: true) returns true.
IsEmpty(st) - Check if the string is empty
Number(st) - Convert a string into a number
Trim(st) - Trim white spaces of a string
Upper(st) - Convert a string to upper case
Lower(st) - Convert a string to lower case
SubString(st, start: nchars, end: nchars) - Extract a sub string from a string. e.g. SubString("ABCDEF", start: 2) is "CDEF", SubString("ABCDEF", start: 2, end: 2) is CD, SubString("ABCDEF", start: -2) is EF.
Len(st) - Get the length of a string