When using a dropdown using Enums it should be possible to choose, which options from the enumeration should be shown in the UI.
A flexible approach in line with existing features would be conditional visibility on the individual options.
This would significantly improve the reusability of individual widgets and also of Enumerations itself, avoiding code duplication and unmaintainable workarounds.
Example:
You use a Yes/No enumeration in an entity. Then you find you need 'N/A' in some cases as an option, depending on another attribute.
There are workarounds, but none are really good to maintain: Use custom widgets (might not be allowed in your compay, no support, no maintenance guarantee); add a second enum, a second attribute, a second dropdown ... increasing complexity in followup flows that use the Yes/No/NA value in validations and process logic.
@Gert: The new combo box is now clearly a good platform supported solution to create such an enumeration based dropdown, Thanks for the hint.
Would be great to have a comparable replacement for Radio Buttons too.
I still think this lacks ease of use. While offering more flexibility it is unnecessarily complex.
Why not simply chose the options like below - the way we know from conditional visibility:
Use in Mx10 Combo box widget and next the Static option as source. Choose your enum, fill the value you want.
Would be great feature, for now we fix this CSS:
.dropdown-hide-resident {
option[value='Resident'] {
display:none;
}
}
Some times we combine them with Dynamic classes, for even more flexibility