Get item from collection

The Get item from collection action A tool for building the processes, logic, and direction within workflows. retrieves an item from the specified collection A variable containing multiple items, such as email addresses. Collection variables are useful for storing and operating on query results. For example, you can set up collection variables for names, email addresses, and index values to store results from querying a list. You can then loop through items in a particular collection variable (names, emails, or index values)..

For example, while iterating through query results you might use this action to retrieve an item for processing. You can also use this action within the Loop for each action.

The functionality of this action has been enhanced with the switch to the new workflow engine. For more information about the workflow engine, see Workflow engine.

Previous behavior New behavior

The action returns the value of the first item in the nested collection.

For example, a [1, [2,3]] collection returns 2.

The action prints the values of all items in the nested collection.

For example, a [1,[2,3]] collection returns 2, 3.

Add and configure the Get item from collection action

In the Designer page:

  1. Click the Collection operations action group in the action toolbox.

    or

    Find actions by browsing action groups, or by typing an action name or function in the Search field at the top of the action toolbox.

  2. Drag the Get item from collection action to the point in the workflow when you want to retrieve an item from a collection variable.
  3. Click the Get item from collection action.
  4. Complete the fields. For more information on the fields, see Get item from collection fields.

    Field

    Example configuration

    Example returned contents

    Target collection collProduce

    apple; carrot; romaine

    Index

    1

     

    Store item

    textItem

    carrot