Order by lookup value in form

Hi there,

is there a way to standard order by the lookup value of a field instead of the actual (id) value?

I have a user id that shows in a form as a username trough lookup. Now the id is the standard sort but i want the username alphabetically sort the shown table.

i tried a new field that uses the select form table in the Onrecord, but you can’t orden on added fields in a form.

any suggestions?

You need to do it with a view that will include the username or do it in your SELECT with a JOIN to the lookup table

If you use the JOIN, be carefull because SC has a bug that deassign all the field and you will need to reconfigure all your field

yeh i had that a few times.but can you do a join in a form?

No but you can use the ORDER BY

(SELECT username FROM table WHERE userid = id)

The only problem is that both id must have a different name

image