Iterate a match on 1:M files

Hey @htims05,

To iterate and append results, you need to have a child module and a parent module. In the parent module, you list all the file paths you want to iterate through. With the “Iterate” action, these file paths are sent as parameters to the child module, which is where the matching is made for each file. The Iteration mode of the “Iterate” action needs to be “Iterate and append results”.

I have created a sample project which shows how this would work, please download this zip (don’t move the files / rename the folders as relative paths are being used in the project).

Matching sample project.zip (22.2 KB)

In the ZIP, apart from the Morph project, there is 1 matching file, and 2 data files. In this example, we are attempting to match Product Name in the data & matching files in order to obtain the Product Code.

Matching file:

image

Data file 1:

image

Data file 2:

image

This is what happens in the project:

Parent module:

  1. List files:

  1. Iterate:

  1. Result of iterations (note: In this sample project, the match that takes place in the child module is via a Lookup (exact match), so you would have to adapt this for fuzzy matching. This post may help: Partial or fuzzy lookup):

Child module: Load the matching file + perform the lookup with the data file that has been loaded in the current iteration. Example of iteration of Data file 1, loading both the matching file + data file and performing the lookup:

Regards