Airtable automation action: Sort list
  • 08 Aug 2024
  • 4 Minuten zu lesen
  • Dunkel
    Hell
  • pdf

Airtable automation action: Sort list

  • Dunkel
    Hell
  • pdf

The content is currently unavailable in German. You are viewing the default English version.
Artikel-Zusammenfassung

Plan availability

All plan types with varying limitations

Permissions

  • Owners/Creators - Create, delete, duplicate, configure, or rename an automation and edit an automation's description.

  • Editors - View an automation's configuration or copy an automation's URL.

Platform(s)

Web/Browser, Mac app, and Windows app 

Related reading

Creating an automation - Learn how to set up your first automation in Airtable.

In automations where you have already used a “Find records” automation action, you can add an additional automation action to then sort the records that are found. This way, in later automation action steps, the list of records can be processed in an expected format. Read on to learn more about how to set up this type of automation action and the expected behavior and known limitations.

Note

Your automation must contain at least one “Find records” action in order to add and configure a “Sort list” action.

Setting up an automation to sort a list of records

Step 1: Create a new automation or navigate to a previously configured automation

  • Create a new automation - To start creating an automation, from the open base of your choice click on Automations in the upper left corner of your screen to open the automation configuration window. Click the + Create automation option to begin the setup process. If you would like, you can rename the automation right away to make it easier to understand what it does. Move on to step 2 below.

  • Navigate to a previously configured automation - To select an existing automation containing a “Find records” action, from the base containing the automation you want to modify, click on Automations in the upper left corner of your screen to open the automation configuration window. Find the automation containing an existing “Find records” action. Skip to step 4 below.

Step 2: Configure a trigger

Next, you will need to click + Add trigger option. Once clicked, the available triggers will display for you to choose from. Click here to learn more about all available automation triggers . Once you have configured and tested the trigger, you can move on to the next step.

Step 3: Add a “Find records” action

  1. Click the + Add advanced logic or action option.

  2. Scroll down in the menu that appears, then find and click on the “Find records” option.

  3. Configure this action to fit your needs. If you need more information about setting up the “Find records” action, consult the following documentation.

Step 4: Add a “Sort list” action

  1. Click the + Add advanced logic or action option or click the + button that appears in between the existing “Find records” action and another action in your automation’s configuration.

  2. Next, select the Sort list option.

Step 5: Configure the “Sort list” action

  1. Feel free to enter a description of what the action will do. You can always add one later if you prefer to skip this step.

  2. Under “Configuration,” click the blue Select input list button.

  3. Next, click the “Find records” action step that you would like to sort, then click the Use as a list token option. Some automations may contain multiple “Find records” steps, so be sure to read the short description provided so that you select the correct action. You’ll need to set up multiple “Sort list” actions if you want to sort the outputs of multiple “Find records” actions.

  4. Next, under Sort by configure the conditions to sort based on one or more field conditions. This will modify the list output to be sorted according to your specific sort conditions. The order can either be Ascending or Descending and will depend on the field type related to the condition you are configuring.

    • Note that fields are compared in order. So, if the fields "First Name" and then "Last Name" are selected, "Last Name" will be used to compare records that have the same value for "First Name.”

    • We provide more guidance about unsupported field types in this section.

  5. Now, you can click Test action and then scroll down to the "Sorted items” section to get a preview of what the sorted output of found records would look like. Click into the Field values if needed, to glean details about each record in the list. If needed, go back and adjust any of the configuration parameters discussed above.

Step 5: Add another action to utilize the found records

After you've found and sorted the records you are looking for, you can add another action to determine what step to take with those records (as long as at least one record was found).

One example workflow would be to find a list of records with impending due dates and sort those records “Ascending” (soonest due date first), then use the "Send email" action to automatically email those records to the people on your team for review. You are free to use any automation action that's most helpful for your workflow.

Below you can see the set up of an automation similar to the example provided above:

Limitations and dependencies

Unsupported field types

  • Lookup fields

  • Multi-select fields

  • Foreign key fields (i.e. fields linking to other records)

  • Attachment fields

  • Button fields

  • Multi-user fields. Single user fields can be used as a sort field. In this case, the user's name will be used to sort.

Miscellaneous limitations and dependencies

  • The “Sort list” action only accepts record arrays returned by the "find records" action as an input from a previous step in the automation you are configuring. Record arrays returned from the "Custom script" action are not valid inputs to use with a “Sort list” action.

  • Sorting a record list array before using it as an input to a repeating group of automation actions does NOT affect the processing order. We do not offer any guarantees with regards to the order in which a repeating group of actions are processed.

  • Any records that don't have a value for a chosen sort field will show up last in the sorted list, regardless of whether the selected order is ascending or descending. In other words, if the sort field is "Name,” then records with an empty "Name" field will always show up last in the list of records.

FAQs


War dieser Artikel hilfreich?