Using dropdown control you cannot compute the value for the label. Often it is required to have the label be something like CODE - LABEL and the underlying value stored is just CODE. The control only allows a defined property or the group feature.
Standard HTML version would be something like so:
<option value="">-- Select a value --</option>
<option value="123" selected="selected">123 - Label for 123</option>
<option value="456">456 -Label for 456</option>
<option value="789">789 - Label for 789</option>
<option value="101">101 - Label for 101</option>
In pega dropdown you cannot compute the select value, see attached:
Is there a way to work around this, without writing a custom pxDropdown, its a pretty standard web practice with dropdowns?
We have a requirement to only use auto-completes for long lists, for short lists we want to use dropdowns. We also have a requirement to make all of our ui controls to work consistently, so yes we use that method for auto-completes but want the same Code-Label for the drop downs. As a workaround, we are computing a third property, Code+Label and using that property for display and just code for the actual value, this is less than ideal, so we are still looking for a solution to this issue.
Yes ideally there would be a better OOTB way of doing this as its a pretty standard web feature. Computing a third property for each list value seems like not the best practice. Is there already a customized pxDropdown available? Does anyone have another solution to this issue?