[DONE] Inaccurate sorting on Relationship Fields

What is the expected rule for trying to sort on a relationship field? As seen in the screenshot below, I have tried to apply a sort but got no logically sorted list in return.

These ā€˜Team Member Profilesā€™ in this case are relationships to another app where their name, info, Member, is listedā€¦but when looking from this location via related fields, the names are not listed in any Alphabetical way by first or last name at allā€¦Is this a bug, or am I just missing something here?

Screenshot 2024-02-20 at 3.00.56 PM

1 Like

Hi @CarsonRedCliffLabs

thanks a lot for reporting this issue! This is indeed a known limitation when sorting by the relationship field (which is caused by the fact that the relationship fields can repeatedly refer to other relationship fields and data types as the first field, which makes the title calculation very complex). We are working on removing this limitation.

But there is already a simple way to make this possible. You would just need to add a calculation field that refers to the relation field, and then you can sort alphabetically as you wish.
All you have to do is enter the name of the title field in the app with @ in the calculation field and write [0] after it.

Cheers
Leo

2 Likes

thanks @Leo helpful and quick as always!

1 Like

@Leo howeverā€¦ thats also an issue with calculation fields. I have this formular:

image

And the sorted result looks like this:

Bildschirmfoto 2024-03-01 um 09.30.22

I wouldnā€™t mark this issue done, as its still there. We canā€™t just add another calculation field as workaround for an issue here and there on the long run. This adds effort and complexity to each app.

1 Like

Hi @dirk_s,

since we have already done the hard work and rebuilt the title logic, sorting relation fields by name and no longer by ID could be a low hanging optimization.

I will get back to you when I have a more precise assessment.

Best regards
Leo

1 Like