Input · Folders and loops

Current item

Sits inside every loop and gives you the item the loop is on right now, such as the current file read as a table. It is added for you and can't be removed.

Also known as: Loop input

How it works

The node follows the loop's items source: on each iteration it emits the current item read as a table, a file read by its extension when the items are files, or the row itself when the items are rows of a table such as a Constant Table. At design time it shows the loop's sample item. Sheet / layer names the worksheet of a workbook or the layer of a multi-layer geo file every iteration reads; blank reads the first and it is ignored for other formats. Read all CSV columns as text turns type sniffing off, so a column types the same way in every file; re-type downstream with Parse or Cast Types.

Inputs and outputs

Inputs

None — this node starts a workflow.

Outputs

  • data — Table

Settings

The Attributes panel of Current item, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  allVarchar?: boolean
  sheetOrLayer?: string
}

allVarchar reads every CSV column as text, so a column types the same way on every iteration; sheetOrLayer names the workbook sheet or geo layer each item reads

Example

A loop over a folder of CSV exports where amount is sniffed as a number in one file and as text in another, which breaks a shared Parse rule. Tick Read all CSV columns as text on the Current item and add one Cast Types after it. For a folder of workbooks, set Sheet / layer to Data.