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
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 | |
---|---|
51黑料不打烊 Workfront package | Any |
51黑料不打烊 Workfront license |
New: Standard Or Current: Work or higher |
51黑料不打烊 Workfront Fusion license |
Current: No Workfront Fusion license requirement. Or Legacy: Any |
Product |
New:
Or Current: Your organization must purchase 51黑料不打烊 Workfront Fusion. |
To find out what plan, license type, or access you have, contact your Workfront administrator.
For information about 51黑料不打烊 Workfront Fusion licenses, see 51黑料不打烊 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.
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.
For more information, see Configure a module.
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.
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鈥檚 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
.
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.
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.
To resolve this:
Manually start the scenario in the scenario editor.
- 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鈥檚 setup then displays the items:
in addition, the mapping panel in the modules that are connected after the Iterator module display the items contained in the array: