• New Commercial Services Section

    We have now opened a commercial services section here on the forum. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.

    Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.

Sort list by the value of a dropdown element

enrb

Member
Hi everyone, I have a list with several elements, I want to sort them alafabetically based on the value of a dropdown element. By choosing the dropdown element in Sort by, the list is sorted by id and not by value.
How do I go about sorting the list by the value of the dropdown element?
 
Hi, with the dropdown from databasejoin you are storing the child id (value) in the parent database table and not the label.

A possibility to still sort it on the label is to create a join between the lists. List->Data->Joins. Join the Element of the stored id to the id of the child list and then all elements of the child list will also appear in the parent list. You can hide what is not needed, but now you can sort on the label of the child id.
 

Attachments

  • sort_on_label.png
    sort_on_label.png
    102.9 KB · Views: 98
I didn't use the "databasejoin" element type, but I used the simple "dropdown" element type ...
 
Hi, sorry for the misunderstanding. When I set the (dropdown) element as Order By, in my case it does Order By on the dropdown element and not on the id. See screenshot
 

Attachments

  • upload_2020-6-29_16-20-49.png
    upload_2020-6-29_16-20-49.png
    14.5 KB · Views: 96
  • upload_2020-6-29_16-23-12.png
    upload_2020-6-29_16-23-12.png
    11.3 KB · Views: 96
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top