Order Iterator Positions

Hey everyone,

I’m currently pulling data from Airtable, and I’m using an iterator to get information from linked items using “Get a Record.” Now, I want to create folders for these linked items and number them according to their dates. For example:

1 - Folder (1.1.2022)
2 - Folder (2.1.2022)

However, the folders should be numbered based on their dates, so the linked items all have a date, and the numbering should be based on that. I need a function that sorts the results of the iterator by date so that I can take the number position from the iterator. Unfortunately, I haven’t found a suitable solution yet. Do you have any ideas?


If I am correct you are getting date type not date string from Airtable, right? What you can do use sort function to sort the date.

For eg, If you are getting an array named results from airtable, then what you can do is,

{{sort("results"; "asc"; "dateFieldName")}}

Whereby the dateFieldName is the one the field that you get as date from airtable, if it is inside a collection you can do dateFieldName.value to locate the fields.

After which, you can iterate the results or directly use the sort function in iterator to grab the Bundle Order Position for further processing.

1 Like

Hey @Runcorn,

thanks for your help! Where should I implement this formula? This is how the workflow looks like:

So, If I am reading the scenario correctly, the Iterator[3] will iterate over the Records that you want to sort, right? If this is the case, then you will need to use array aggregator after Get a record Module[5], and then sort the results and then perform GDrive actions.