Import from csv - only unique values

I’m making a csv import of products on palettes… I want it to insert data into two different tables - 1. all the products and 2. only unique palettes from that file.
Step one works just fine but I’m having a hard time with getting unique palettes names…
Annotation 2020-04-18 105714
doing the above will give me the desired number of repeats - once for every unique palette but the names will come out as blank…


I tried playing around with the Set Value action but I must be doing something wrong…
Any clues on what I’m missing?

If you want to see the output of a step like set value or repeater, you must enable the “output” option for it

Fair enough, but I’m only using the output here to show that I’m getting empty array.
The real issue is getting unique values and using them in the repeat step.

You can assign the output of the import to a new single set value and use a formatter to filter it - we have a lot collection formatters for that.

So i set it up like this:


And I still get only blank inserts…

Yes that should do it, you can actually also direct assign the formatter to your repeat, no need for the extra set value.

Check the output then again.

Maybe the first repeater modifies then value.
Try to save it first with set value - before the first repeater runs.

I removed the first repeater completely. Still only NULL values are added to the db

that’s how I had it set up in my initial post.

And how did you map the values for the db insert?

I’m getting the same fields to chose from I got in the first repeat (the one that works fine) so I’m not changing anything here.

EDIT:
Also, I noticed that I’m only having this issue with .unique formatter. If, for example, I filter it using some “where” condition it’ll work fine.

I did some more experimenting and noticed that .unique formatter outputs a single object with all the unique values as properties and other formatters like .where outputs an array of objects…


test1 is .unique
test2 is .where

I’m guessing this causes the issue? Is it a bug or is it intended?