Sorting dropdownlist on Enum caption

0
Hello, I have the following scenario: Entity with an attribute called name which is an enumeration. In the front-end I have a dropdownlist where I would like to sort on the caption of the name attribute. I could not get this to work. As far as I understand when you set sortorder to an enum it sorts by key, however the keys have no logical alphabetic order, so this does not result in a sorted list. I have tried removing the sortorder alltogether from the dropdownlist and manually rearange the enumeration entries so that the keys are scattered but atleast the captions are sorted but this did not result in a sorted list either (in the front-end). The only solution I can think of now is creating leading dummy characters such as AA_[enumkey] AB_[enumkey] and then sort by name or perhaps creating a new attribute displayname in the given enitiy and sort on that one. Both will take up a lot of time by migrating and creating the new logic when creating and deleting these objects.. Is there any alternative solution? Thanks in advance,   Selwyn de Jonckheere  
asked
1 answers
0

Hi, I think you can use a reference selector in combination with some helper objects for this. Double click on the reference selector, go to tab selectable objects and choose the microflow option as a source.

Also create a helper object which also includes the name caption of the enumeration and associate this object with your 'main' object which you are displaying on the page.

You can now retrieve the helper objects in your selectable objects source microflow and sort them here.

answered