Is their a standard methodology for creating a JL that contains only Unique values from the query/relation? E.g. -
1 | a
2 | a
3 | b
4 | c
5 | a
6 | b
would yield a,b,c
Thanks
Is their a standard methodology for creating a JL that contains only Unique values from the query/relation? E.g. -
1 | a
2 | a
3 | b
4 | c
5 | a
6 | b
would yield a,b,c
Thanks
A bit of a round about way is as follows:
Another way would be to create a column in the source table that only contains unique values:
I do the former (the above) and the initial queries can return 1,000+ results which I convert/convert/convert to get to the unique array/list. Final unique arrays have dozens or scores of unique items.
Is the alternative method better/more efficient or scales better? I can use this since most my tables have RowIDs. Not really sure what is efficient/fast/scale within Glide.
Did you consider using a JavaScript column?
A third alternative would be JavaScript, as I see @burningmikey just suggested. You could feed your original Joined List into that and write some code to remove duplicates.
To be honest, Iâm not sure which would be most efficient. If youâre dealing with a large number of rows, then Iâd probably steer away from option 2, as self relations have been known to cause performance issues with very large tables.
@burningmikey - not a Javascript person so I did not.
@Darren_Murphy - thanks as always, will stay the course since it works - just âlooks uglyâ
PS. I think Joined lists should offer a âunique onlyâ check box when creating. Would mirror âcount uniqueâ in Roll-ups to give you the list of unique items in the count.
Sounds good.
You know you can always use chatGPT to generate JavaScript for you. You just explain what you want to do, add the format of your data, show an example of the output you want and it will do the work for you.
Just in case you wanted to give the JavaScript option a try:
const array = p1.split(', ');
const unique = [...new Set(array)];
return unique.join(',');
Worked as expected. ThanksâŚnow another tool in the old toll box!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.