if (condition) then
Runs [statements] if the condition is true. If 'else' is specified, runs [statements2] if condition is false.
Repeats [statements] while (condition) is true.
loop through (list) as #variable
For each element of (list), repeats [statements], setting #variable to the current element of each iteration. If (list) is a number, iterates through the numbers 1 to that number, setting #variable to each number for each iteration.
Exits the script without executing any further statements.
run task name at path [with node]
Runs the action called 'name' at 'path' in the database, optionally passing in 'node' that will contain the input parameters.
Usually scripts must run within 120 seconds. This statement extends the amount of time allowed for this script to run by another 120 seconds. This configurable limitation is added as a protection against defective code such as infinite loops.
status "Message", percentage
The 'status' statement notifies the user of progress within a script. If they are running an action, then the 'Please wait' section of the form will update with whatever status message is put here, along with a percentage complete.
[status "Message", percStart to percEnd]
For certain operations, such as merge or delete, you can prefix the statement with this status prefix. This will show progress *as* the operation executes, between the two percentages that are specified.
When this precedes a statement, any errors will be ignored and the error text will be placed into #error instead. Keep in mind that transactions are not automatically rolled-back and any changes made prior to the error will still be committed as part of the current transaction. You can run "transaction abort" to abort the current transaction and start it again.
Next Topic: Parallel Processing
[ Client.Wiki, Professional ]
Up Since 6/8/2019 12:09:47 PM