Help

Airtable API: Sorting records by two parameters and prioritise

Topic Labels: API
1730 4
cancel
Showing results for 
Search instead for 
Did you mean: 
kxr1m
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey there,

I am currently using the Airtable API by using Make (Integromat).

Since the sorting from the base won’t get passed to the output, you need to sort it inside the API call.

Now I want to sort my output by two parameters.
Bildschirmfoto 2022-09-11 um 14.16.11
Unfortunately the sort[0] parameter gets overwritten by sort[1].

I would like to have the sort[0] prioritised, how could I do that?

Any input or suggestions would be highly appreciated.

Thanks in advance! :slightly_smiling_face:

4 Replies 4

That isn’t what the sort interface looks like in Integromat/Make. Where are you getting that screenshot from?

kxr1m
5 - Automation Enthusiast
5 - Automation Enthusiast

Don’t worry, it is.
Bildschirmfoto 2022-09-11 um 15.19.49

Why are you not using the “search records” module instead of trying to craft your own API call?

I don’t know how to guide you on your method, but your issue might be that the sort parameter is expecting an array of fields. Not sure.

In the meantime, I would recommend using the Search module, which has the sort functionality built into it.

By the way, for what it’s worth, I just tested your code above, and it works fine for me! Check out my screenshot below from Make.com to make sure you have it correct on your end.

If it’s still not sorting correctly on your end, then you might have some problem with your data in Airtable, such as leading spaces in your fields that might be throwing off the sort.

Screen Shot 2022-09-11 at 11.23.40 AM

The one problem here is that when you craft your own API call, all of your records are all returned as one bundle, and then you have to iterate through them to do things with them individually. When you use the search module, each record is returned individually to you.