A Loop and Reduce creates one separate document for each value in the selected field. All data not included in the selection will be removed, i.e. the document is split up into several smaller documents. The reduction is based on a selection, either done directly in QMC or using bookmarks.
To create a Loop and Reduce
1. Go to Reduce tab and click Open Document-button to retreive the Fields available in the document:2. Select the Fields and values for the reduction:
By Field Value will create several separate documents for each value in the selected field.By Bookmark
will create one separate document per each available bookmark.
3. Since the Loop and Reduce option will result in several documents it is necessary to create unique
resulting document names, to avoid documents to be overwritten. This is done on the Reduce Document Name
. In this example %DocumentField,Dim1%
is used.4. Press Apply
5. The setup will result in one document created for every value in the selected field. In this example for Field Dim1. The field Dim1 contains value A-C. Therefore the result will be 3 documents, one for each value, redcuced on this value:The Loop and Reduce can also be combined with a Simple Reduce, see article:https://eu1.salesforce.com/articles/Basic/How-to-Setup-a-task-with-combined-Simple-Reduce-and-Loop-and-ReduceFor more information about Simple Reduce see article:https://eu1.salesforce.com/articles/Basic/How-to-setup-a-Task-with-Simple-reduce