Skip to main content

FieldLogs

Enhanced Scripting

Enhanced Scripting allows you to build Scripts using JavaScript.

FieldLogs specific Instructions can also be used with JavaScript Instructions. These Instructions enable the Script to interact with the data of the current Task.

Note

FieldLogs specific Instructions can be identified by the FieldLogs keyword prefix Flkw:

FieldLogs specific Instructions can be classified into the following categories:

Category

Description

Display Alert

Displays an alert to the user. This is only used for debugging complex Scripts.

Global Value

Retrieves/Sets Global Variable values.

Step Value

Retrieves/Sets the values of Steps.

Step Property

Retrieves/Sets the properties of Steps.

Table Manipulations

Manipulates values in a Table Step.

External Call

Retrieves/Posts data from/to external servers.

Identity

Retrieves Identity and Role related properties.

Enterprise Object Data

Retrieves/Sets/Manipulates values in Object Variables.

Context Property

Retrieves the properties of the context for current user.

Custom Field Values

Retrieves the values of Template and Step level Custom Fields.

Redo Steps

Allows you to redo Steps.

Multi Choice Options

Sets different choices for Multi Choice type Steps.

Manipulating Template Variables

Retrieves/Sets/Manipulates values in Template Variables.

Extract Data from an Identity

Extracts data from an Identity.

Get Current User

Retrieves the logged-in user's identity details.

Get Current Task

Retrieves the currently running Task's details.

These FieldLogs specific Instructions (FieldLogs keywords) can be combined with other JavaScript expressions.

A single Script Instruction of type JS Execute can hold an entire JavaScript program. This JavaScript program can also include Flkw: Instructions.

To create an Enhanced Script:

Select JS Execute from the Instruction dropdown list. Enter the JavaScript program in the Expression field.

EnhancedScriptingExample1.png

Note that the above JavaScript program uses Flkw:Instructions to retrieve and set the current Task data.

As you type, the code editor applies JavaScript syntax highlighting and offers autocomplete suggestions for Flkw Instructions and Custom Functions.

Clicking the ExpandIcon.png icon in the bottom right corner of the Expression field expands it into a larger editor view. Any edits you make there automatically sync back to the Expression field.

ExpandHighlighted.png
ExpandedEditor.png

The editor marks syntax errors in the script with a red underline. Hovering over the affected section displays the corresponding error message, as shown below.

ErrorsHighlighted.png