I’d like to return the category in a specific collection if our ID is included in a comma separated list in that collection… I think the formula should look like this but I can’t get past split.
if(contains(split(map({Data:rows};JoinedListID);,);{MY_ID})=true;map({Data:rows};Category;);something else)
12.col3 is the ID I am trying to match. It comes through Iterator
When I start with Map it works.
When I add split my output is empty…
Thanks in advance.
Cause, you are trying to split an array, the map will result in an array, not a string. What you can do is, after map function perform a join function using ,
as operator and then do split.
if(contains(split(join(map({Data:rows};JoinedListID);,);,);{MY_ID})=true;map({Data:rows};Category;);something else)
2 Likes
Ok that solved the first part but how do I lookup the precise category? Currently if there is a match it returns all the categories.
???
I’m trying to acheive something like this…
Is it possible to wrap the ID in wildcards so it searches for the ID with anything in front of or behind it?
Ok that solved the first part but how do I lookup the precise category? Currently, if there is a match it returns all the categories.
Yes, Cause you are returning the Category and in the else part.
Is it possible to wrap the ID in wildcards so it searches for the ID with anything in front of or behind it?
Currently, It is not possible to do so using the Map function, Unless someone else has a better solution. The only way, to do it is to use an iterator and then do a compare to filter out the results and pick up the required Category, either in an array aggregator or in the module you want to utilize it.
1 Like
Ok thank you.
I could explain my flow a little better and hopefully get some guidance where to place modules.
- Email containing csv
- Get All Rows From External Table
- Parse csv from email
- Array aggregator for parse csv
- iterate through the rows from array aggregator
- Look for match in external table. The ID will be located in column JoinedListID in a comma separated list.
For example
If our ID is #7VTAT it should return the single Category ‘Socks’
I hope this helps.
Are you available for hire? Thanks again.
Thanks for sharing the flow,
Since the map one will not work what you want to do now is use an iterator after the last iterator[5] which iterates through Rows obtained in Step 2.
After that put an array aggregator that will grab the category, and in between the new array iterator and aggregator put a filter, that will check if the JoinedListID contains the CSV List ID. This will save operations plus will result in an array of category matching the ListID, which then in the target module you can just use get(newaggregatorarray;1)
2 Likes