Functions reference
Comparison, string, math, date, list, and logical functions available in RBlang expressions.
Use these functions inside expression conditions.
For UI-focused examples, see Expressions List.
Comparison
Use comparison functions to return true or false.
is equal tois not equal tois greater thanis greater than or equal tois less thanis less than or equal toisWithinRange(val, min, max)
Examples:
<condition expression="%AGE is greater than 30"/>
<condition expression="isWithinRange(%AGE, 18, 35)"/>String
Use string functions for matching and text construction.
includes(str, substr)startsWith(str, prefix)endsWith(str, suffix)regexCount(str, pattern)+for concatenation
For regexCount(), the pattern must be a JavaScript-flavoured (ECMAScript) regex in /pattern/flags format.
Example: '/cat/gi'
Examples:
Mathematical
Use math functions with number values.
+,-,*,/round(num, decimals)ceil(num)floor(num)abs(num)min(n1, n2, ...)max(n1, n2, ...)mod(num, divisor)pow(base, exp)sqrt(num)
Example:
Date
Use date functions with date concepts and date literals.
today()now()dayOfWeek(date)dayOfMonth(date)dayOfYear(date)monthOfYear(date)year(date)addDays(date, n)subtractDays(date, n)addWeeks(date, n)addMonths(date, n)addYears(date, n)daysBetween(d1, d2)weeksBetween(d1, d2)monthsBetween(d1, d2)yearsBetween(d1, d2)isBeforeDate(d1, d2)isSameDate(d1, d2)isAfterDate(d1, d2)
Use date strings in YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format.
List
List functions work over relationship instances. They are most useful with plural relationships.
Use * for all or variables and literals to filter the subject or object values used by the function.
countRelationshipInstances(subject, relationship, object)sumObjects(subject, relationship, object)minObjects(subject, relationship, object)maxObjects(subject, relationship, object)joinObjects(subject, relationship, object)isSubset(subject1, relationship1, object1, subject2, relationship2, object2)
Examples:
Logical operators
Use and and or to combine tests.
Use parentheses to control evaluation order.
Last updated

