<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 Items and Create a New List in Workflows (Using the List – Map Card)
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

This article describes how to iterate over items, create a new list in Workflows, and use the List-Map card.

Applies To
  • Okta Workflows
Solution

If there is a list of users and need a new list where each user is listed as lastname.firstname. Perhaps this name format is needed to create an account in another system. 

  1. To start, this is the main flow: 

Workflows

  • The first card, the Okta – List Group Members, gets all members (users) from the specified group.
  • The List – Map card calls a helper flow to process the user list. The entire record (User) is passed to the helper flow. It returns a list (new list) that can be used in the rest of the flow.
    • This is different from the For Each action that also processes a list but does not return a list back).
  • In this example, the Flow Control—Assign card displays the returned list. It indicates whether a list is available for use in the rest of the flow.
  1. This is the helper flow: 

Workflows

  • In the first Helper Flow card, the input is the current record (User).
  • The Get Multiple card retrieves the First Name and the Last Name of the current user. Other fields can also be retrieved.
  • The Text Concatenate card concatenates the First Name, a period (.), and the Last Name.
  • The Flow Control – Return card receives a new name in the lastname.firstnameformat and adds it to the new list. Once all the items are processed, the List – Map card (main flow) returns a new list. This new list is now available in the main flow.
  1. This screenshot shows one run of the helper flow that returns one name in the lastname.firstname format: 

Workflows

  1. This screenshot shows the main flow execution: 

Workflows

  1. The new list (from Assign card):

Workflows

If familiar with the List – For Each card, it processes the list item but does not return a value back to the main flow. The List – Map card processes a list of items and returns a new list to the main flow.

Related References

Loading
How to Iterate Over Items and Create a New List in Workflows (Using the List – Map Card)