You can! We try to leverage the spreadsheet whenever possible, so the way to do it is with a spreadsheet trick. I’ve shared a spreadsheet here with an example.
Assume you’ve got the raw data in a worksheet called RawData. Just create a second worksheet called Sorted that will always project a sorted version of the raw data.
- In cell A1 of that new sheet, use the formula =ArrayFormula(RawData!A1:Z1) to copy the header row.
- In cell A2 of that new sheet, use the formula =SORT(RawData!A2:Z, 1, true) to copy (and sort) everything else.
You could use a similar trick to create a third worksheet that only grabs the top 250 of your leader board by placing the formula =ArrayFormula(Sorted!A1:Z251) in cell A1. With this approach you’d have three worksheets: the raw data, the sorted data, and the top leaders.
Remember you’ll have to sync your spreadsheet in Cloudstitch to publish it to the API (or set it to auto-sync). And note that some of the references in the arguments above depend on the particulars of your spreadsheet.
Then just use the sorted data inside Thunkable. You can grab the data from only one worksheet by appending /WorksheetName to the URL see for the API Endpoint in the Thunkable editor