Iterator, Aggregator

Hey everyone.

I’m at my wits end with the aggregator, iterator and mapping, so I’ll try to explain the best I can of what I’m trying to achieve.

I have an array of data coming in from a CRM. When using an iterator on that array, I get 40 different bundles, each containing a unique custom field with it’s value, or without it, depending if that specific custom field has been populated. With 40 different bundles it means I have 40 different unique custom fields. I would like to only isolate two, and then use their values to populate the data store. I already have everything setup, it’s pretty clunky but it works. However, because it’s a clunky setup I’m having issues expanding on it.

I read a whole bunch of resources and watched YT videos, but couldn’t find the exact scenario like mine. All of the use cases I’ve seen have same type of data with different values in each bundle that is part of the initial array. As mentioned, it’s different with the aray for my data, as each bundle contains different and unique set of data. I would like to isolate two and use their values in the rest of the flow.

Here’s the screenshot of a few bundles that are part of the array.

Please help :slight_smile:

1 Like

IMO you should remove Iterator and just learn how to use map() function. Hard to tell you more because I would like to see how data looks before iterator. There are many good videos on YT about map functions.

1 Like

Welcome to the Make community!

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Please share screenshots of your scenario, any error messages, relevant module fields, and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:

2. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

3. Output Bundles of Modules

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

1 Like

Thanks for replying. Truly appreciate it.

Here’s a part of the flow. The data is coming from the Kartra platform, as you can see.

I’ve attached the data input and output from the “Kartra - Get a lead” module which is what the iterator get
Input Bundle.txt (58 Bytes)
Output Bundle.txt (9.7 KB)

I took your suggestion and tried to put in “Set Multiple Variables” module after the “Kartra - get a lead” module and tried to map the “Discord username” field but it returned empty. I assume that’s because I didn’t map the field properly. I’m attaching the screenshot of the map function below.

I watched various YouTube videos on how to map the field or extract the data from the array, but all of them had collections with the same data structure meaning each collection had the same field types with different values. The data array I’m using have 40 different collections, each having a different field id, identified, value, etc. which confuses me a bit tbh.

Let me know your thoughts please.

I have actually found the solution by successfully mapping the exact fields inside specific collections within an array, using the “Set multiple variables” module. I followed the instructions I found in the following YT video that actually covers the exact scenario as my own where every collection within an array had a unique set of data: https://www.youtube.com/watch?v=QGhuNDxWIDE I hope it helps anyone else who might need it.

Thank you for the nudge in the right direction, @Adrian4 !

4 Likes

Hey @TBT

We are glad to see you got it and appreciate sharing with others.

Regards,
Msquare Automation - Gold Partner of Make
@Msquare_Automation