Get Current Task
Flkw:GetCurrentTask() retrieves the details of the currently running Task as a JSON object. This Instruction is available in the Custom Function scripting context.
This Instruction allows Custom Functions to automatically retrieve the Task context (such as the work order number) without requiring the technician to manually enter it.
Important
If no Task is currently running when this Instruction is called, no data is returned. Ensure a Task is active before calling this Instruction.
This is accomplished by the following FieldLogs specific Instruction:
Flkw:GetCurrentTask();
Flkw:GetCurrentTask() returns a JSON object containing the full details of the Task that is currently being executed.
It does not require any parameters. The returned object contains the following properties.
Format : Flkw:GetCurrentTask();
Return Property | Description |
|---|---|
| The unique identifier of the current Task. |
| The name of the current Task. |
| The name of the job (work order) associated with the Task. |
| The user currently assigned to perform the Task. |
| The user who assigned the Task. |
| The current execution status of the Task (e.g., In Progress). |
| The identifier of the Template used to create the Task. |
| A JSON object containing additional custom properties defined for the Task. |
Example Return Value
An example of values returned by Flkw:GetCurrentTask() is shown below.

Usage Example
In a Tool Calibration Custom Function, you can use Flkw:GetCurrentTask() to automatically retrieve the work order number instead of requiring manual entry.
