UNIQUE function for lists

When using select, you can specify that the returned list is unique. However, when you combine lists using addition, there is no way to ensure the resulting values in the list are unique. It would be good to have a UNIQUE() function that you could pass a list to which would remove duplicates. Another good version of this would be to add a “remove duplicates” parameter to the sort function.

In my experience, you can make a list unique by subtracting a blank list from it.

For example:

SELECT(table[id],TRUE)-LIST()

Will return a list of unique items in the table.

3 Likes

Thanks Jonathan.

That works perfectly.

Cheers,

Andy

Note that @Jonathon’s suggestion (that I myself use in my own apps) is not supported behavior, so it may change in the future without notice.

1 Like

I agree Steve. It would be better to have an actual documented function to this.

Cheers,

Andy

2 Likes

I have need for this as well, but my data set is too large to afford a SELECT() on it; I really need a way to take a list and say - give me a list of the options here.