Can I get the position of something in a list...

Can I get the position of something in a list? for example if I do an orderby and get a list of results, Can I then say so _THIS key is 5th?

0 7 440
7 REPLIES 7

@Aleksi_Alkio probably can roll this off of his tongue…

It would be possible with a INDEXOF() function but it doesn’t exist.

@Bellave_Jayaram hrm… i’m thinking maybe some sort of find, len, etc…

We don’t have this functionality. While we have “List” types, there are no operations to sort them. In fact, their order is not guaranteed (they are really more Sets than Lists) so anything involving position would be a hack at best at the moment.

How about something like… TOP(ORDERBY(SELECT(…),[Datetime],5) - TOP(ORDERBY(SELECT(…),[Datetime],4)?

I’ll need to play with that concept a bit…

OrderBy only works with a list of keys/refs. So it is going to be challenging (not to mention, wildly inefficient!)

Top Labels in this Space