Execute a loop through a SQL query results
Execute a loop through a SQL query results
Runs a loop over each row returned by a Firebird: Query action. The actions inside the loop run once for every row of the result, so each record can be processed individually. Use Firebird: Get result field inside the loop to read the values of each column.
Options
Query
Reference to the Firebird: Query action whose results will be iterated.
Returns
Javascript code
js
actions["action-id"].currentResult // result of the current iteration (Any)
actions["action-id"].currentResultIndex // index of the current iteration (Number)
Field selection
- currentResult — result of the current loop iteration (Any)
- currentResultIndex — index of the current iteration (Number)
Rules and Conditions
- The Query field is required and must reference a Firebird: Query action.
- The actions inside the loop run once for every returned row.
- If the query returns no results, the loop does not run.