Hi…I have used Slice() many times in the past, but I am stumped today.
I have a table with a price column and ABS() of price change.
I want to filter out prices less than $20, do a descending sort of ABS(), and use Slice to display the top 15 rows of data…but after filtering price and sorting ABS, I cannot get Slice to work:
thisRow.Price > 20 AND thisRow.in(thisTable.Sort(false,thisTable.ABS))
Thank you for confirming the right order: Filter, Sort, Slice.
But I still can’t get Slice to work.
Here’s a sample document…my goal is to see only the first 15 entries.
I’m still struggling with this. I can get the following to sort of work…except the sliced result is never 15, it’s always less than that, and I suspect it’s just giving me all entries with price over 20 that meet the other criteria. But shouldn’t it filter out everything with price below 20, then give me the first 15 after that?
thisRow.Price>20 AND thisRow.in(thisTable.Sort(false,thisTable.ABS).Slice(0,15))
I’m sorry to be such a dope, but I cannot get this to work - the filter of price > 20 works, but the slice does not, you can see it outputs 51 rows instead of 15: