Expressions

Jigx Variables

16min

 has a set of variables that can be used in expressions to manipulate data specific to a , for example, determining the logged-in user, or the organization and solution.

Organization

The organization variable is used to get information about the actual organization in , such as your organization's id.

Configuration

Result

Expression

id

Examples and code snippets 

Organization expression
Organization expression


This example returns the organization's id . Each organization configured in Organization Settings in and will have a unique id. See the full code sample in GitHub.

YAML


System

The system variable in an expression is used to get information about devices, for example, you can find information about the internet connection of the device, the language preference, the device's timezone and location details. System expressions are configured by [email protected]. followed by the specific variable name.

Configuration

The supported variables for the system variable are:

Variable

Expression

Results

deviceType

The variable returns the current user's device type, such as tablet or handset.

geocodes



isOffline

Boolean

isOnline

Boolean

isPortrait

The variable is set with a boolean and is used to configure the behavior of components in either portrait or landscape mode.

locale



timezone

Get the information about the device's timezone, it can be: -name: e.g. Europe/Prague -offset: e.g. +200

geolocation

Accuracy: [email protected] Altitude: [email protected] Altitude Accuracy: [email protected] Location - Heading: [email protected] Location - Latitude: [email protected] Location - Longitude: [email protected] Location - Speed: [email protected] Location - Timestamp: [email protected] Location - Entire array (All details): =$string(@ctx.system.geolocation)



isLocationSharingEnabled

Boolean

solution

XXXXXXXX-XXX-XXXX-XXXX-XXXXXXXXXXXX

user

[email protected] or XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Examples and code snippets

System isOffline

System expression
System expression


With this expression, you can disable the action button to prevent it from being pressed if the device is offline.

See the full code sample in GitHub.

isOffline.jigx






System timezone

This example uses system.timezone to get the information about the device's timezone, it can be the name of the timezone or the offset. Use it further to convert date/time using Date & Time expressions into the format that you require.

See the full code sample in GitHub.

YAML




System timezone expression
System timezone expression


System geolocation

system geolocation expression
system geolocation expression




This example shows how you can use system.geolocation to get the device's location (details).

See the full code sample in GitHub.

YAML


System isLocationSharingEnabled

See the example using dynamic data in GitHub.

YAML

Document image


User

Examples and code snippets

The user is used to get information about the logged-in user, for example, name, and email.

Configuration

User expression
User expression


See the full code sample in GitHub.

user.jigx


Solution

The solution variable is used to get information about the specific solution, for example, name, and id. Custom variables can be set in Solution Settings in , and the variable value referenced in the solution expression.

Configuration

Result

Expression

name

id

variable value

Examples and code snippets

Solution Id and name

Solution expression
Solution expression


This example shows how to get the solution's id and name using the solution variable.

See the full code sample in Github.

YAML


Solution settings - custom variable

Setting Custom Variables
Setting Custom Variables

Showing variable value
Showing variable value

YAML