How do I sort a form field created by a relation?

I have two databases connected by a many to many relation. One is Company and the other is Company Type. When I create a form for Companies, the Company Types field shows a list of names from the Company Type database. How do I sort the Company Types field dropdown list in the Companies form? I’m trying to get the list in alphabetical order, which it is currently not in by default. I see no options to sort this list.

Help please, thanks!

You could try going to an already created entity, clicking on the relation field, and using the sort feature there. Perhaps that will change it in the form as well?

Otherwise, it might be stuck being tied to the order based on the entity number in the database (which I think is based on the order in which they are created).

Thanks for your reply Michael. In the Data section, I see a table and sorted the Company Types relation field there as shown in this image. I was able to sort this alphabetically.

However, the form field does not sort alphabetically to correspond with this sorting in the Data.

In the form view below, I would have expected to see some sort of sorting options where the red marks are, but looks like there is no way to sort it. Seems like a basic form feature many would need.

Thanks!

The sort order for options in a form view is the unfiltered (default) order i.e. sorted by rank.
If you want to change it, then use/create a view with no sort applied, and then manually drag and drop to change the relative order of the items.

I will add this topic to the Ideas and Features section. Seems like a basic feature forms should have.
Sorting by rank only is not good for fields with many options and manually sorting is not a good use of time. Thanks.