Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Sort and Order Options for Linked Field Records

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Karlstens
11 - Venus
11 - Venus
Status: New Ideas
What is the proposed idea/solution?

I would like to see the added options within a Grid View (and also in Interfaces) of the ability to manipulate the order of Linked Records within a Link field.

Karlstens_1-1674508929889.png

Options including;

  1. Sort Records by an associated View within the Linked Table.
  2. Sort Records by one or many lookup fields within the Linked Table (such as a date, number, string etc).
  3. Sort Records as per their originally linked stack order, but also add a reverse stack option to show the recently added records either first or last.
  4. A toggle option that turns off all sort and leaves the current behaviour as is, allowing the user to manually sort records into any random order they desire. If the user toggles a sort on, and then off again, their desired manual sort order returns (and is not lost).

 

How does is solve the user problems?

A user can employ a Scripting Extension script or an Automation script action to execute upon their Link Field being updated, where their script applies the desired sort order to the records within the field - but such a workaround is rigid and out of reach of most common users.

I believe that having Link Field sort options as part of the Airtable UI would be a widely accepted and used feature.

Who is the target audience?

Anyone using a Link Field who finds the need to apply order to those linked records within that Link Field.

14 Comments
Karlstens
11 - Venus
11 - Venus

As a side note, the Linked Record card displayed fields are also hardwired to the first view of parent table - Instead, these should be showing the cards from within a specified View once a view has been specified within the Field Options.

Karlstens_0-1674509562808.png


Note the View is configured in the Link Fields table;

Karlstens_1-1674509595970.png

Yet the Cards fail to refer to the desired View and show irrelevant fields. Where we're needing to see "Status", the cards return the fields from the "Grid View", of rating, and PDF, both of which are unused and thus empty.

Karlstens_2-1674509616313.png

 

kuovonne
18 - Pluto
18 - Pluto

@Karlstens wrote:

I would like to see the added options within a Grid View (and also in Interfaces) of the ability to manipulate the order of Linked Records within a Link field.


Just in case you didn't know, it currently is possible to manually re-order linked records within a linked record field. Of course, this is a tedious process. It is also possible to sort linked record fields by using the Batch Update extension, although it will only sort linked records by the primary field using an alphabetic sort.


@Karlstens wrote:

A user can employ a Scripting Extension script or an Automation script action to execute upon their Link Field being updated, where their script applies the desired sort order to the records within the field - but such a workaround is rigid and out of reach of most common users.

I believe that having Link Field sort options as part of the Airtable UI would be a widely accepted and used feature.


I agree that a native solution would be very useful. However, in the meantime, there are workarounds that are neither rigid nor out of reach of common users. I sell both an extension and an automation script for sorting linked records. Both can be used by people with no scripting knowledge. (And note, that the Link Field being updated is not necessarily the proper trigger to use in order to keep records sorted. For example, when trying to keep record sorted by date, sometimes the date is entered after the link is established. Thus, the sort should occur when the date is entered as well as when the link is established.)

To be clear, I am not trying to take away from your suggestions--they are excellent. Rather I am trying to let people know about alternatives that are available right now.

It also isn't quite clear from your annotated screen capture if you want action buttons in the record list to sort the records when the button is clicked, or if you want settings that will automatically keep the fields sorted. If you want settings that will automatically keep the fields sorted, I would expect that to be on the field configuration screen, and not the record list. (Note that keeping the record list sorted automatically according to a view in the linked table also has significant engineering challenges.)

Karlstens
11 - Venus
11 - Venus

@kuovonneyes, I'm aware of the manual drag/drop method to re-order records. This can also be leveraged within an Automation script to re-order the records that's triggered upon the Link field record being updated.

My Automation script that sorts the order of my linked records is as per below.

const {recordIndexID, unsortedIds} = input.config();

let itemsTable = base.getTable("Fruits");

let targetRecords = await itemsTable.selectRecordsAsync({
    fields: ["Fruit", "Created", "Fruit Index"],
    recordIds : unsortedIds   
    })

console.log(targetRecords)

let sortedIds = targetRecords.records.map( record => ({
    id : record.id,
    date : new Date( record.getCellValue("Created"))
}))
.sort((a,b) => Date.parse(a.date) - Date.parse(b.date))
.map( ({id}) => ({id: id}));

console.log(sortedIds)

let indexTable = base.getTable("Fruit Index");
await indexTable.updateRecordAsync(recordIndexID, {
    "Fruits" : sortedIds
})

 

Iyas_AlQasem
6 - Interface Innovator
6 - Interface Innovator

These 2 requirements have been driving me up the wall. To the extent that I contemplated having multiple fields relating to the same subrecord, with each field having the sort that I was looking for as a criterion. But that creates all kinds of new mess that would be far more easily resolved if the "Limit records to a view" adopted both the sort order of that view, and the order and visible columns within that view.

I'm trying to minimise custom coding on the site, including automations, and for something as light as this, it seems like a real shame to have to go down that route.

climesumer
6 - Interface Innovator
6 - Interface Innovator

Plus one for me!
Simple features like this one are missing all over Airtable and introduce unnecessary complexity when building applications.  

mwinterm69
4 - Data Explorer
4 - Data Explorer

this would be SO useful.

 

being able to sort the linked field so i can order it by most recently updated instead of applying the filter view only.

Rebecca_Rasmuss
4 - Data Explorer
4 - Data Explorer

+100000 from me. :0)

hunt5
4 - Data Explorer
4 - Data Explorer

This would be critical. When attempting to add a linked record, when you search there is no way to organize how the results are returned. This leads to endless scrolling to find the record we are looking for.

Rutger
5 - Automation Enthusiast
5 - Automation Enthusiast

we also need this!

vcgptpurs
5 - Automation Enthusiast
5 - Automation Enthusiast

+1