Expressions
Expressions can be used in various places, such as:
set
properties of create and update actionauthorize
rulesdefault
values in fields and inputscomputed
propertiesselect
Primitive values
computed five { 5 }
computed fiveStr { "five" }
Operators
computed fullName {
firstName + " " + lastName
}
computed isValidStatus {
status in ["active", "pending", "failed", "succeeded"]
}
Supported operators
+
for string concatenation+
,-
,/
,*
, a number arithmeticsand
,or
for boolean expressionsis
,is not
for comparison between values of a same typein
,not in
, checks for existence of a value in an array of elements or records
Functions
computed charCount {
length(fullName)
}
Supported functions
length
, calculates a length of a string valuelower
, lowercases a string valueupper
, uppercases a string valuenow
, returns an integer - UNIX timestamp at the time of executionstringify
, turns anything into text using JSON serializercount
, returns a number of records in a collectionsum
, sums a value of a column within a collection