Events
Delayed set
delayedSet · delayedSet(variable: string, value: any, delayMs: double)
Writes a value into a variable once a delay has passed. It queues one write each time its formula runs: on every change of a variable the formula reads, and once at start. A stop or a restart drops the writes still waiting. A formula that delays a write into a variable it reads keeps re-arming itself.
Parameters
| Name | Type | Description |
|---|---|---|
variable |
string |
The code of the variable to write, as text in quotes. |
value |
any |
The value to write, as it is when the formula runs. |
delayMs |
double |
How long to wait, in milliseconds, from 0 to 604800000 (seven days). Rounded to a whole millisecond. |
Returns boolean: true when the write was queued; false when the variable does not exist, the delay is out of range, the queue is full or the engine is stopped.
Examples
delayedSet("LEVEL", LEVEL + 1, 5000) → *
delayedSet("NO_SUCH_VARIABLE", 1, 1000) → false
delayedSet("LEVEL", 50, -1) → false
Data Orchester: available in plant formulas.
This page describes Amtiri Script 5.5.0 as shipped with Data Orchester engine 6.22.0 and Site 1.27.0.