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

**URL:** <https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153>\
**Category:** Get Help\
**Created:** [January 20, 2025, 9:56am UTC](https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153 "2025-01-20T09:56:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spesify](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/spesify/32/10892_2.png) [@Spesify](https://community.fibery.io/u/Spesify)\
**Post date:** [January 20, 2025, 9:56am UTC](https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153/1 "2025-01-20T09:56:15Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/538faf31b6265e981b5f208efbd7f962a30dbae2.png)

Help please, thanks!

---

<div class="post-metadata">

**Author:** ![Michael\_Ichter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/michael_ichter/32/9931_2.png) [@Michael\_Ichter](https://community.fibery.io/u/Michael_Ichter)\
**Post date:** [January 20, 2025, 10:32am UTC](https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153/2 "2025-01-20T10:32:13Z")

</div>

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?

 ![list of entities in a relation field, which the sort button highlighted](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/2/22a36053dd3afd1f17b9b7922c82c7e8df7a294c.png)

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).

---

<div class="post-metadata">

**Author:** ![Spesify](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/spesify/32/10892_2.png) [@Spesify](https://community.fibery.io/u/Spesify)\
**Post date:** [January 20, 2025, 10:56am UTC](https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153/3 "2025-01-20T10:56:40Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/3/36ec631687b068022f6481f1409ecec4ed1d725c.png)

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.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/a/ad4928c9bcf45c6e9a8af2c4f02b8662e0cf7203.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [January 20, 2025, 7:11pm UTC](https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153/4 "2025-01-20T19:11:16Z")

</div>

The sort order for options in a form view is the unfiltered (default) order i.e. [sorted by rank.](https://the.fibery.io/@public/User_Guide/Guide/Sorts-180/anchor=Default-sorting--2648bd86-084e-44b6-a023-6af98f0400ac)  
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.

---

<div class="post-metadata">

**Author:** ![Spesify](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/spesify/32/10892_2.png) [@Spesify](https://community.fibery.io/u/Spesify)\
**Post date:** [January 21, 2025, 8:59am UTC](https://community.fibery.io/t/how-do-i-sort-a-form-field-created-by-a-relation/8153/5 "2025-01-21T08:59:11Z")

</div>

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.
