Skip to main content

FieldLogs

Context Property

The Context Property Instructions access current session information.

The session information relates to the current user, current Template, current Task, current device, current app and other context-related information.

The list of properties that you can use in this expression:

Property name

Description

user.id

The id of the logged user.

user.firstname

The first name of the user.

user.lastname

The last name of the user.

user.nickname

The nickname of the user.

user.email

The e-mail address of the user.

user.group.id

The id of the Group the user belongs to.

user.group.name

The name of the Group the user belongs to.

user.enterprise.id

The id of the Enterprise the user belongs to.

template.title

The title of the Template that the user is currently executing.

template.id

The id of the Template that the user is currently executing.

template.version

The version of the Template that the user is currently executing.

template.owner

The owner of the Template that the user is currently executing.

template.description

The description of the Template that the user is currently executing.

template.suite

The suite of the Template that the user is currently executing.

template.package

The package of the Template that the user is currently executing.

job.title

The title of the Job that the user is currently executing.

job.id

The id of the Job that the user is currently executing.

job.owner

The owner of the Job that the user is currently executing.

task.id

The id of the Task that the user is currently executing.

task.title

The title of the Task that the user is currently executing.

device.os

The operating system of the device on which the current Task is executed.

device.manufacturer

The manufacturer of the device on which the current Task is executed.

device.model

The model of the device on which the current Task is executed.

app.version

The version of the application that is currently executing the Task.

info.timestamp

The current time (in seconds).

info.location.longitude

The longitude of the current location of the device that is executing the job (in radians).

Requires the use of the function time and GPS stamping of all actions.

info.location.altitude

The altitude of the current location of the device that is executing the job (in meters).

Requires the use of the function time and GPS stamping of all actions.

info.location.timestamp

The time of the GPS location of the device that is executing the job (in seconds).

Requires the use of the function time and GPS stamping of all actions.

info.location.speed

The speed registered at the current time (in m/s).

Requires the use of the function time and GPS stamping of all actions.

info.location.course

The course of the device that is currently executing the job (radians).

Requires the use of the function time and GPS stamping of all actions.

info.location.verticalAccuracy

The vertical accuracy of the current location (in meters).

Requires the use of the function time and GPS stamping of all actions.

info.location.horizontalAccuracy

The horizontal accuracy of the current location (in meters).

Requires the use of the function time and GPS stamping of all actions.

Flkw:GetContextProperty gets the value of a context property for the current account that is logged in.

Format: Flkw:GetContextProperty('Property name');

Parameter

Description

Property name

The name of the property from the context of the current user.

To construct an enhanced Script Instruction using Flkw:GetContextProperty:

  • Select JS Execute from the Instruction dropdown list. In the Expression field, enter the Flkw:GetContextProperty Instruction as shown.

    CP1.png

The Flkw:GetContextProperty Instruction is added to the Script.

At runtime, the Script retrieves the Context Properties user.ID and device.OS.

CP2.png

The retrieved values are used to populate the following fields as shown.

CP3.png