โ05-08-2024 10:18 PM - edited โ05-08-2024 10:18 PM
say I have a lookup table with repeated entries in a particular column
e.g.
property1
property1
property2
property3
how would I query the lookup table to return a list containing the 3 unique entries?
Solved! Go to Solution.
โ05-08-2024 10:54 PM
Use the Lookup Table > Get all Entries action and this will return the entire lookup table.
Then use a Ruby formula to pluck and uniq the output. The structure of the LUT output is an array of objects each with a nested object containing the data, so you have to pluck the entry key, and then pluck the column with your property value. The result is an array on which you can call the uniq method to remove dupes.
[entries].pluck('entry').pluck('col1').uniq
โ05-08-2024 10:54 PM
Use the Lookup Table > Get all Entries action and this will return the entire lookup table.
Then use a Ruby formula to pluck and uniq the output. The structure of the LUT output is an array of objects each with a nested object containing the data, so you have to pluck the entry key, and then pluck the column with your property value. The result is an array on which you can call the uniq method to remove dupes.
[entries].pluck('entry').pluck('col1').uniq
โ05-13-2024 04:25 AM
can you elaborate on the step to add that contains that formula?
โ05-09-2024 11:08 PM
Here is one more way to achieve this usecase. We can create variables and make a list. Then we can perform a query through SQL collection by workato. Through this solution, no need to perform iteration(for loop). Below is the recipe link, please go through it. Hope this will be helpful for you.
https://app.workato.com/recipes/47270819?st=48063075644985a1b4f82d3b287521ea3bf071c36ad1974f726553dc...