Jun 14, 2022 01:51 AM
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?
Jun 14, 2022 04:21 AM
Hi Matteo, hmm, could you try using a rollup field instead of a lookup field?
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
Jun 14, 2022 04:38 AM
It looks like you are grouping on a single select field. What is the order of the choices in the field configuration?
Jun 14, 2022 05:44 AM
Jun 14, 2022 06:08 AM
Jun 14, 2022 06:14 AM
thanks @Adam_TheTimeSavingCo this works fine, although as you said it is not that pretty :slightly_smiling_face:
Jun 14, 2022 09:05 AM
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.
Jun 14, 2022 09:09 AM
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:
Jun 14, 2022 09:22 AM
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.