Recursive Workflow issue when a thing is a list of things

Hi everyone! Hoping to get some clarity on how to deal with this scenario. Let me try to explain where I’m stuck.

Basically, I’ve created a Recursive Workflow to create entries to a database, but I have few fields that stores multiple things, for example:

  1. First Entry:
    1.1 Product name - example: Laptop (single thing - works fine)
    1.2 Product Brands - example: Apple, Dell, Microsoft (multiple things - where I have issues)

  2. Second Entry:
    2.1 Product name - example: Mouse (works fine)
    2.2 Brands - example: Logitech, Microsoft (issues)

When I run the Recursive workflow, it creates the Product name correctly (in the example, creating two entries). But for the Brands (List of Brands), I’ve tried multiple possibilities, but this is the result I’m getting:

  1. Using “add list”
    Laptop receives Apple, Dell, Microsoft, Logitech, Microsoft
    Mouse receives Apple, Dell, Microsoft, Logitech, Microsoft

So it adds the entire list of brands for both

  1. Using “add”
    Laptop receives Apple
    Mouse receives Dell

So it goes one by one in the entire list.

I’m unable to figure out how to keep the data structure, so the multiple entries to a thing (Brand) maintains it when I’m creating the new entry in this database. Is there a way to achieve that and keep the link to the Brand database, what is the ideal scenario.

Thanks a lot Bubblers!

If you have successfully made it so the Product Name works properly, which is likely done by removing the first entry in the list when looping through the list recursively, you should be able to do the same with the Brands by the Set List function and ensure when looping through you remove the items that have already been used, and make sure that the list you send into the recursive flow is not simply the entire list of all brands for all products, but is structured in such a way that you essentially have a list of lists for brands.

1 Like

Thanks a lot for the reply @boston85719
Makes a lot of sense, I’m just trying to figure out how to do the last part that you mentioned, how to structure in that way (list of lists for brands).

Super thanks