System Variables
In OL Connect Workflow, system variables (prefixed with a %) can be inserted into scriptable fields to retrieve and insert job, process, and date-related values. They are commonly used to create timestamps, build date-based batch strings, or return information about the current job file.
In OL Connect Automate, the same information is exposed differently: either through msg properties or via JSONata expressions. The table below maps OL Connect Workflow’s system variables to their equivalents in OL Connect Automate.
-
File-related variables are typically available under
msg.filewhen using the folder capture or folder listing nodes. -
Date/time values can be generated with JSONata’s $moment() functions.
For example, the following JSONata expression inserts a formatted date string:
$moment().format("YYYYMMDD_hhmmss")
This outputs a value like:
20240708_043210
The image below illustrates how a Change node can be used to insert a system-variable equivalent into a custom message property. In this example, the JSONata expression shown above is evaluated to generate a formatted timestamp, which is then stored in msg.myTimeStamp.
For more details, see JSONata for dates and timestamps and other JSONata expression samples.
System Variable Mapping
| Workflow Variable | Description | Automate Equivalent |
|---|---|---|
|
%o |
Original file name with file extension. |
When using the Folder Listing node set Output option to Array of Objects. |
|
%a |
Job file last modified date. |
See %o: |
|
%c |
Content of the job file in its original format. |
Use read file node to read the data into |
|
%F |
Job file path and name. |
See %o: |
|
%f |
Job file name including the file extension. |
See %o: |
|
%z |
Job file size in bytes. |
See %o: msg.file.size. |
|
%O |
Original file name without extension. |
See %o: |
|
%y |
Current year. |
JSONata expression:
|
|
%m |
Current month (numeric). |
JSONata expression:
|
|
%M |
Current month (text). |
|
|
%d |
Current day (numeric). |
JSONata expression:
|
|
%D |
Current day (text). |
JSONata expression:
|
|
%I |
Current day (short text). |
JSONata expression:
|
|
%h |
Current hour. |
JSONata expression:
|
|
%n |
Current minute. |
JSONata expression:
|
|
%s |
Current second. |
JSONata expression:
|
|
%v |
Current millisecond. |
JSONata expression:
|
|
%r |
Run mode |
|
|
%u |
Unique 13-char. |
JSONata or function node:
|
| %U |
Unique 36-char. |
Create GUIDs via the function node by adding a module like |
|
%t |
Current temp folder. |
|
|
%e |
Current metadata file name. |
|
|
%E |
Current metadata path. |
|
|
%w |
Current process name. |
Not available, manually set a property via change node like |
|
%i |
Current loop iteration index. |
Within a split/join combination: |