ÃÛ¶¹ÊÓƵ

Iterator module

An Iterator is a type of module that converts an array into a series of bundles. Each array item is outputted as a separate bundle.

Access requirements

Expand to view access requirements for the functionality in this article.

You must have the following access to use the functionality in this article:

table 0-row-2 1-row-2 2-row-2 3-row-2 layout-auto html-authored no-header
ÃÛ¶¹ÊÓƵ Workfront package Any
ÃÛ¶¹ÊÓƵ Workfront license

New: Standard

Or

Current: Work or higher

ÃÛ¶¹ÊÓƵ Workfront Fusion license

Current: No Workfront Fusion license requirement.

Or

Legacy: Any

Product

New:

  • Select or Prime Workfront plan: Your organization must purchase ÃÛ¶¹ÊÓƵ Workfront Fusion.
  • Ultimate Workfront plan: Workfront Fusion is included.

Or

Current: Your organization must purchase ÃÛ¶¹ÊÓƵ Workfront Fusion.

To find out what plan, license type, or access you have, contact your Workfront administrator.

For information about ÃÛ¶¹ÊÓƵ Workfront Fusion licenses, see ÃÛ¶¹ÊÓƵ Workfront Fusion licenses.

Iterator module configuration

The general Iterator module has a single field, The Array field. This field contains the array to be converted or split into separate bundles.

Set up iterator

Other connectors may include iterator modules specific to that iterator. These contain a Source module field, which allows you to select that module that outputs the array that you want to iterate.

Specialized iterators

For more information, see Configure a module.

recommendation-more-help

Examples:

  • The below scenario shows how to retrieve emails with attachments and save the attachments as single files in a selected Dropbox folder.

    Emails can contain an array of attachments. The Iterator module after the first module enables the scenario to handle each attachment separately. The Iterator module splits the array of attachments into single bundles. Each bundle, with one attachment, is then saved one at a time in a selected Dropbox folder. The Array field in the Iterator module should contain the Attachments array.

    Attachments array

Troubleshooting

Problem: Mapping panel does not display mappable items under Iterator module

When an Iterator module does not have information about the structure of the array’s items, the mapping panel in the modules following the Iterator module displays only two items under the Iterator module: Total number of bundles and Bundle order position.

Mapping panel doesn't display

This is because each module is responsible for providing information about items it outputs, so that these items can be properly displayed in the mapping panel in the subsequent modules. However, several modules might be unable to provide this information in some cases. For example, JSON > Parse JSON or Webhooks > Custom Webhook modules with missing Data structure would not provide the information.

Solution

The solution is to manually execute the scenario. This forces the module to create output. Fusion can then apply the format of this output to later modules in the scenario.

For example, a scenario includes a JSON > Parse JSON module without a Data structure.

Parse JSON

An Iterator module connected to this JSON module cannot map the output of the module to the Array field in the setup panel of the Iterator module.

Connect iterator module

To resolve this:

Manually start the scenario in the scenario editor.

NOTE
To prevent the entire scenario from running, you can:
  • Unlink the modules after the JSON > Parse JSON module to prevent the flow from proceeding further.
    Or
  • Right-click the JSON > Parse JSON module and choose Run this module only from the context menu to execute only the JSON > Parse JSON module.

After the JSON > Parse JSON executes, it can then provide information about its outputs to all the subsequent modules, including the Iterator module. The mapping panel in the Iterator’s setup then displays the items:

Mapping panel displays items

in addition, the mapping panel in the modules that are connected after the Iterator module display the items contained in the array:

Items contained in array

7e1891ad-4d59-4355-88ab-a2e62ed7d1a3