Forum Discussion

srivallivalluri's avatar
srivallivalluri
Qrew Trainee
8 years ago

how to get the latest records first from quickbase in API_DOQUERY

how to get the latest records first from quickbase in API_DOQUERY,here in my application iam showing 10 records for once so the ten records i need to show the latest records not the old one can you help me out with it
  • Use the Sort Order Option on API DO QUERY in order to get latest.

    sortorder-A --specifies an ascending order.

    sortorder-D --specifies a descending order.

    Tip: To sort on multiple fields, simply add more A's or D's onto the sortorder option: sortorder-ADA will sort ascending by the first field in the query, descending by the second field, and ascending by the third field.

    nosort --returns unsorted records, ignoring the sortorder option, the slist parameter, and the default sort for the table



    I hope this will work.
  • Try adding the slist parameter and choosing the date field as the field to sort, then the options param to specify ascending or descending, I think descending for newest? I always get those flipped when sorting dates. Also with the options parameter you can specify "onlynew " to get only new or updated records.
    https://help.quickbase.com/api-guide/do_query.html