Skip to main content
Roberty Studio
RPACSV

For each row in CSV file

For each row in CSV file

Goes through every row of a previously read CSV file, running a block of actions for each row. A custom range of rows to go through can be set.


Options​

CSV file​

Select the CSV file already read by a previous CSV file reading action. The field lists the CSV files available in the flow.

Skip blank lines?​

Defines whether rows with no content are ignored during the iteration. The options are:

  • Yes: Blank rows are skipped and processing continues on the next filled row.
  • No: Every row, including the empty ones, is processed (default).

Custom range?​

Lets you set manually which rows are gone through. When enabled, it shows the fields:

Step through line CSV file (Start Line)​

Enter the number of the row where the iteration starts. Rows are counted from 0 (first row of the file).

Down to the line (Final line)​

Enter the number of the row where the iteration stops. The iteration ends at the row before the given one: for example, with Start Line 0 and Final line 10, rows 0 to 9 are processed.

Returns​

Javascript code​

js
actions["action-id"].currentRow // current line number (Number)
actions["action-id"].rowsCount // total number of rows (Number)

Field selection​

  • currentRow — current line number (Number)
  • rowsCount — total number of rows (Number)

currentRow numbering starts at 0, which is the first row of the file.

Rules and Conditions​

  • The CSV file field is required and must reference a CSV reading action performed earlier.
  • When the custom range is enabled, the start and final row fields become required.
  • The start row cannot be greater than the final row.
  • Use the CSV file reading action before this one to load the file.