Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 80923

Sorting dropdownlist on Enum caption

$
0
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

 


Viewing all articles
Browse latest Browse all 80923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>