Use this reference to look up the operators and functions supported in Applaud expressions.
Applaud expressions use the JSONata expression language.
For a practical introduction, see Use expressions in workflows and Agent Tools.
Variable references
Use a variable path to reference workflow data.
| Data | Example |
| Workflow input | $.inputs.employeeId |
| Action output | $.CreateRequest.requestId |
| State variable | $requestNumber |
| Current Process List item | $.item |
Type @ to open the variable picker and select available workflow data.
Operators
Comparison operators
| Operator | Description |
| = | Equal to |
| != | Not equal to |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
| in | Checks whether a value occurs in a collection |
Logical operators
| Operator | Description |
| and | Both conditions are true |
| or | At least one condition is true |
Arithmetic operators
| Operator | Description |
| + | Add |
| - | Subtract |
| * | Multiply |
| / | Divide |
| % | Remainder |
String operator
| Operator | Description |
| & | Combines strings |
Example:
$.inputs.firstName & ' ' & $.inputs.lastName
Common functions
| Function | What it does | Example |
| $string() | Converts a value to text. | $string($.inputs.employeeId) |
| $number() | Converts a value to a number. | $number($.inputs.amount) |
| $boolean() | Converts a value to a Boolean (true or false). | $boolean($.inputs.isManager) |
| $exists() | Checks whether a value exists. | $exists($.inputs.employeeId) |
| $count() | Counts the items in an array. | $count($.GetTeam.members) |
| $length() | Returns the length of a string. | $length($.inputs.employeeName) |
| $append() | Combines arrays or adds an item to an array. | $append($.inputs.roles, "Manager") |
| $substring() | Returns part of a string. | $substring($.inputs.employeeId, 0, 5) |
| $uppercase() | Converts text to uppercase. | $uppercase($.inputs.department) |
| $lowercase() | Converts text to lowercase. | $lowercase($.inputs.department) |
Array and object functions
| Function | What it does | Example |
| $map() | Transforms each item in an array. | $map($.GetTeam.members, function($m) { $m.email }) |
| $filter() | Returns only the items that meet a condition. | $filter($.GetTeam.members, function($m) { $m.active = true }) |
| $sift() | Filters the entries in an object. | $sift($.inputs.employee, function($v) { $exists($v) }) |
| $spread() | Converts an object into an array of single-key objects. | $spread($.inputs.employee) |
Date and time functions
| Function | What it does | Example |
| $now() | Returns the current date and time in ISO 8601 UTC format. | $now() |
Expression syntax in Agent Tools
Agent Tool fx fields support JSONata expressions.
For example:
$.inputs.firstName & ' ' & $.inputs.lastName
Agent Tool value fields use value substitution:
{firstName}
Agent instructions use:
{{$.inputs.firstName}}
These formats aren't interchangeable.
Validation and testing
Workflow expressions are validated when you validate or publish a workflow.
Validation can identify problems such as:
- Invalid syntax
- Unknown variables
- Missing references
- Invalid expressions
The Agent Tool fx editor also checks JSONata syntax.
Always test expressions with representative data before using them in production.