PostgreSQL - For each result
PostgreSQL - For each result
Runs a loop over each row returned by a PostgreSQL: Query action. The actions inside the loop run once for every row of the result, so each record can be processed individually. Use PostgreSQL: Get result field inside the loop to read the values of each column.
Options
Query
Reference to the PostgreSQL: 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 — loop result on each iteration (Any)
- currentResultIndex — index of the current loop result (Number)
Rules and Conditions
- The Query field is required and must reference a PostgreSQL: Query action.
- The actions inside the loop run once for every returned row.