Grouping and sorting by linked records

Hello people!

Maybe someone of you can help me to “sort” this out :nerd_face:

I have a table where the records are sorted automatically when grouped.

when I link all the records into another table and group by the same field, the groups are not sorted correctly. I also tried to use the convenient “sort” command, but no luck…

Any idea how to get the groups sorted using the linked field?

Thanks!

Hi Matteo, hmm, could you try using a rollup field instead of a lookup field?
sort linked

It’d look less pretty, but at least it sorts properly. No idea why this is happening I’m afraid

I’ve set it up here for you to check out

It looks like you are grouping on a single select field. What is the order of the choices in the field configuration?

I believe that this is a bug in Airtable that we all need to report to support@airtable.com.

1 Like

Hello @kuovonne it looks like the order of the choice is correct

thanks @Adam_TheTimeSavingCo this works fine, although as you said it is not that pretty :slight_smile:

Wow. This is a really bizarre bug. I think this is one for support.

I believe that the bug is related to the commas in your single select choices. Notice that all of the out-of-order choices are sorted alphabetically at the end, and they do not have commas. All the choices that do have commas are sorted alphabetically at the beginning.

If you change the options so that they all have commas, or none have commas, they should short alphabetically in the linked table. But that doesn’t really help the situation since adding or removing commas isn’t realistic. It just just helps the engineers identify the bug.

I’ve experienced this bug in the past, and I don’t believe that any of my single select choices had commas in them. I could be wrong about this, though. I will need to go back and revisit.

I’ve also been meaning to report this to Airtable for many months now, but haven’t got around to it because I’ve been so busy reporting other more pressing bugs. :stuck_out_tongue_winking_eye:

1 Like

I’ll bet you a fine sandwich that this particular sorting issue is due to a comma, a quote, a tab, a line break, or similar character in the single select choice.

Notice that if you use the lookup field in a formula field, the result for lookup values with commas (or similar special characters) will be enclosed in quotes. All the values with quotes sort before the values without quotes.

There are, of course, other issues with sorting. In the original table, the single-select field will sort according to the order of choices as defined in the field configuration. However, in the linked table, the lookup of the single-select will sort alphabetically, and not in the order defined by the field configuration.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.