<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
0D54z00007WioE8CAJOkta Identity EngineWorkflowsAnswered2024-10-28T09:05:16.000Z2022-03-23T17:07:11.000Z2022-04-29T21:31:06.000Z

PatrickM.70145 (Customer) asked a question.

Okta Workflows: How to Iterate Through A Column In a Table

Is there any way to iterate through a column of a table and take every value out and run through another flow? I want to go to a table and for every row in a column and pull the value from there and run it through a "For Each" statement to another flow.

 

I am very disappointed and frustrated in the lack of functionality around Tables in Workflows. The "Read Row" function is useless because you need to populate a row ID first but there is also no function to automatically get multiple Row IDs, these have to be entered manually which is not that useful if you want to automate something.

 

Any insight to getting this to work would be appreciated


  • MaxKatz (Okta)

    Hi @PatrickM.70145 (Customer)​,

     

    You can use Tables - Search Rows card.

     

    In Options, set the Result Set to "All matching rows".

     

    If you don't enter anything for "Where Expression" - you will get all the rows in a table as a list of objects.

     

    Screen Shot 2022-03-23 at 10.22.04 AM 

     

    Expand Post
  • User16412262181551847440 (Federal Support)

    Hi @PatrickM.70145 (Customer)​ 

     

    You may also want to feed the output of search rows into a List -> "For Each" card, and then use a helper flow linked to that card to find/act on the desired value from your table.

    For Each will iterate over each row in the provided table that matches your filter expression, and pass those values to the helper flow to be acted upon according to whatever your use case is.

     

    image 

    By using Search Rows instead of Read row as Max indicated, you can get the entire contents, and by feeding it to "For each" you can iteratively "do something" to each row meeting your search criteria (which can be everything in the table if desired).

    Expand Post
  • c11lv (c11lv)

    So if you read the Search Rows card documentation, providing no filter or limit will result in only 3500 rows being brought back by default.

    Search Rows | Okta

    Is there a better solution to grab a larger set of data while still not having to provide a filter, or if you provide a * filter it would grab all data?

    Expand Post
  • MaxKatz (Okta)

    3500 is the limit when searching with tables. In general, tables should be used as a fast cache/transitory place for storing small amounts of data between flow runs or by different flows. Tables are not ideal for strong a lot of data.

     

    Here is one thing you can try. It's not a good solution but if you need to run it infrequently, it might work. Export the data to a CSV file, upload the data to Google Sheets and then search the sheets document. I don't believe there is a limit when searching a Google sheet. I haven't tried this flow so it might not work.

    Expand Post
  • TimL.58332 (Workflows)

    Also, you could potentially paginate the results of the table. There is an offset that could be incremented by your page size. You would probably be better off processing it in chunks though until you hit a "empty" return from the table while moving the offset up each pass.

This question is closed.
Loading
Okta Workflows: How to Iterate Through A Column In a Table