Hi, I am currently connecting to airtable data via the API. I am able to sort my response in certain fields using desc and asc. However for non text fields in particular single select fields where in the UI you would sort First-Last. What would the parameter be for sorting these fields?
Sort single select field via API
Best answer by ScottWorld
This is just one field. This is working for other types of field but when I do something like the below where N is a single select field the results do not come back in a sorted order.
[14/07/2021 10:18] Flanagan, Cameron
-H “Authorization: Bearer {{API_KEY}}”
The sort order for Single Select fields is not evaluated alphabetically… it is evaluated by the order that your single select options are listed within the field customization options.
You can see this within the Airtable interface itself by trying to sort on a single select field.
If you want them alphabetically, you have to manually alphabetize the options within the Airtable interface by clicking on the “sort alphabetically” button within the field options (or you can manually alphabetize them).
Alternatively, you could create a formula field that equals the single select field, and then sort by that formula field instead.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.