Expressions - cheatsheet
Create Filters on a list (Path Operator expression)
=$filter(@ctx.datasources.filter-list, function($v){$contains($string($v.status), $string(@ctx.components.filter-list.state.filter != null ? @ctx.components.filter-list.state.filter:'')) })[]OData filter generation
=($map(@ctx.datasources.employee-customer-detail-string, function($v) { "CustomerID eq " & $v.AccountID}) ~> $join(" or "))Create Search for a list (Path Operator expression)
=$filter(@ctx.datasources.dmsrole-nonlife, function($v){ @ctx.datasources.dmsrole-nonlife ? $contains($string($v.DMSRole),$string(@ctx.components.RosterPositionID.state.searchText != null ? @ctx.components.RosterPositionID.state.searchText:'')) :true})[]Create a placeholder (Boolean expression)
placeholders:
- when: =$count(@ctx.datasources.employees-dynamic) > 0 ? false :true
title: There is no data
icon: missing-dataCheck if a field's value is Null (Boolean expression)
Evaluate
PathsData (String Function expression)
Use evaluate to change data text to JSON object
Base64 image (String expression)
String to number (String expression)
Number to string (String expression)
Combining first and last name (Concatenate)
Splitting display name into first and last name (String expression)
Displaying text
Show text and split name and surname and only displaying name (String expression)
Show text followed by user's display name
Two letter placeholder for avatar (String expression)
True or False ? (Boolean expression)
Adding an expression into a string
Working with Date and Time expressions
Convert UTC to milliseconds
Convert millisecond to UTC
Transform any date to new format
Add days to date + convert to local timezone + format
Set date and time in datePicker to local timezone + format
Add days from current date and add additional time from current time
System variables
Get currently logged in user (Jigx system expression)
Is the mobile device offline (Jigx system expression)
Get country flag icons using system (Jigx system expression)
Create a unique GUID
Formatting Numbers (Numeric functions)
Using objects in expressions
Sorting an array of objects using a lambda (embedded) function
Setting up complex objects with an embedded array
Create a basic join on a static datasource to a local datasource
Transform longitude and latitude data to show markers on a location component
Working with values
Find the value relative to the current node so all paths are relative to it
Find the value relative the root node of the supplied context, no matter what is the current node
Use the JSONata built-in index parameter combined with a filter
Update multiple records in execute-entities (operators > transform)
Validate text fields using JSONata + Regex expression
Use JavaScript functions in expressions
JavaScript checking any value for false
Last updated
Was this helpful?