<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Iterate Over Rows in a Workflows Table
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

This article describes how to iterate over rows in a Workflows table.

Applies To
  • Okta Workflows
Solution

To iterate over rows in a table, is required:

  1. Find the rows (usually done with a search).
  2. Pass each row to a helper flow to process.

Here is an example using a table with all the countries in the world:

table  
 

In the main flow, to find the rows, use the Tables – Search Rows card (max. 3,500 rows will be returned). To return all the rows, do not enter a search expression. Then, pass the rows to the List – For Each card, where a helper flow will process each record at a time.

This is the main flow:

Workflows  
 

In the List – For Each card, set the helper flow (Helper Flow input).

Then set the value to pass to the helper flow (Country row input).

In this flow, pass the entire row or object (named item) to the helper flow.

Also, pass a particular property from the object (row). To learn how to do that, read How to Setup a Workflows Helper Flow (With For-Each and Streaming Cards).

This is the helper flow:

Workflows  
 

A flow becomes a helper flow when the first card is the On Demand – Helper Flow card. This card has one input Country row. The type is an object because the entire object (row) is being passed to this flow.

Use the Object – Get Multiple card to read values from the object (row) passed to this flow. In this example, if reading the Country and its Code.

Learn more about how to use the Object – Get Multiple card: How to Read a JSON Path With Dot-Notation in Workflows.

Result running the flow (helper flow shown):

Workflows

The helper flow will run 248 times for each country in the table. It will get the country and country code.

Here is a video of this work:

Related References

Loading
How to Iterate Over Rows in a Workflows Table