Skip to main content

Return records sorted by field & omit first 10

  • May 9, 2018
  • 2 replies
  • 28 views

Hi there,

Is it possible to return records through the API in a certain order and omit a specified number?

For example, I want to return 10 players sorted by the their points tally (high - low) but I don’t want the top / first 10? (I just want players ranked 10-20)

Cheers,
Thomas.

(P.S. if that’s not possible, is there a way of writing a formula field ‘if’ condition that would translate to this plain English - ‘if first name is alphabetically later (A-Z) than ‘Joe Bloggs’ then return this record’)

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+3
  • Participating Frequently
  • May 10, 2018

To omit certain records you could use the filterByFormula parameter provided by the API, and set it to

AND(rank>=10, rank<=20)

Make sure the parameters are properly URL encoded.

The API also provides you with a “sort” parameter to sort the records
So you could also “sort” by rank and then “filterByFormula” to achieve your desired results


  • Author
  • Participating Frequently
  • May 10, 2018

Thanks Andrew - the issue I have is that I can’t create a rank field - as there’s nothing to rank records by. On reflection the P.S. part of my original post is probably closer to the problem I face.