Sort values in form dropdowns

Hi all!
I wonder if there is a way of sorting the values in a form dropdown?
For link-to-table field, values look sorted according their ID. And for single select fields it looks like they appear in the same order they have been defined in the table.
Is it possible to sort them like A->Z?
Thanks,
Asan

1 Like

Hello @asan, it is not possible to sort values in dropdowns.

I have changed the category of this request to “Feature Ideas”, and we will discuss it with the team. :slightly_smiling_face:

I don’t think that’s really true. They are sorted based on the sort order of that table. So you can change the order if you manually or with API change the order of the rows of the linked table.

Hi!
I’ve just tried by setting a sort Z->A on the key field of a table. The corresponding dropdown does not respect that order (the order is always the ID based one).
Cheers,
Asan

I am not talking about a sort that you apply to a view, but the order of the rows in the table. In the UI the only way to change the order is to use Grid view and manually sort the rows with drag and drop. Or you would need to use the API and set the order for each row there.

This request has been accepted. We will add an option to alphabetize link-to-table and single/multiple select options in a form view from the context menu. :blush:

Great to hear about alphabetical sort for multiple-select fields and others being planned for a future release!
It’s about 1 or 2 weeks ago when I was applying sort by multiple select field and found out that the result is kind of weird.

My sort was configured like this (just to mention: the first one is for the multiple select field):

obrazek

Result:

In such a scenario I would suggest to sort all rows firstly by first multiple select item, then by second one (if there is any), then by third one etc.

Why I am talking about it? Let’s say I have two or three or more items in one or more rows, but one of them is most relevant for the row record, so that’s why I have them like this. What I want to say is, that I would keep the way how in what order they were inserted in the row. See the row 168 from my screenshot. Most relevant item is “vnitřní lékařství - interna” so it is inserted as first one, second one “podiatrie” is less important, so I inserted this one later.
But definitely row 168, when sorting by the “Specialization” field is applied, should be - in alhabetical meaning - much lower, because “vnitřní lékařství - interna” begins with “v” while row 169 begins with “p”.

@olgatrykush do you know when we will be able to sort link-to-table values according to a view in a form field?
Also, that would allow only some values to get displayed. For example, only let people pick collaborators from a given department.
This will be super helpful :slight_smile:

Hey @gabrielle, are you referring to this feature: Filter link to table rows in a form view (#2240) · Issues · Baserow / baserow · GitLab? it has been started yet.

We’ve recently implemented this one: Filter linked table records by a field (#1242) · Issues · Baserow / baserow · GitLab. It can be used as a workaround.

Thanks. How can the workaround be used in the form view?

Hey @gabrielle, you can control which rows users can select when working with linked tables using the “limit selection” feature. Here’s how:

  1. Create a new view with the selection of departments you want to showcase in the form view.
  2. In the link-to-table field, limit the selection by this view.

This allows you to restrict the options available to users. For more details, check out: Link to table field

Haaa thank you that helps a ton!!!

1 Like