I have a scenario where I need to get the top 25% of records from a varying size of found set and I'm looking to script this. The top 25 records need to be the highest in value from the overall found set, so currently I have something like this (Forgive the pigeon scripting):
Enter Find Mode
Set Field (Code = 10)
Sort by Value, Descending
This returns say, 225 results. I can use Get(FoundCount)/4 to establish I actually need 56.25 (57) records.
So, how can I remove the bottom 168 records from the found set?
This will form part of a script which will loop over around 100 times (the code 10 above is just one of many codes), so ideally needs to act nicely in a loop.
Thanks in advance