We need to display the values from a data type field in a dropdown control. The data type has values like open, OPEN, OPen (case-sensitive). We need to show the exact values in the dropdown. We are using a Report Definition as a source to dropdown control.
The issue here is we can see the dropdown values in the UI but it is showing as Open instead of “OPen/OPEN/open” values. We have a similar problem for the “close” value also.
@mounikay4467There is an OOTB field value Open which converts to “Open”. You can save this rule in your application ruleset and mark it as blocked. Please find the below screenshot for the OOTB rule.
@pavan3753 Thanks for the reply. I have saved the OOTB field value Open rule to my custom application ruleset and marked it as blocked. It is working now. Previously I have tried different OOTB rules (pyActionprompt.Open). Now I have tried “pycaption.open” rule.
@mounikay4467 Hi, I would like to give you an idea I applied before because I had a similar issue.
As @pavan3753 said, your problem is because there is a field value that is localizing your dropdown labels. I solved a similar problem using the “Zero width withespace” to “modify” the displayed values (copied from here https://codepen.io/chriscoyier/pen/iLKwm).
So basically, you will insert an extra character to the .pyLabel so that the field value won’t be able to localize because it’s not going to match the displayed label. This extra character will be the “Zero width withespace” (an invisible real character). This also will prevent the localization of any other value with an OOTB field value, for example “New”, “NEw”, “new”, etc.
Follow these steps if you want to try:
Create a Data Page and source it with your Report Definition.
Add a Data Transform to the Data Page in order to add the “Zero width withespace” to each .pyLabel. It’s very important to use another property for the displayed values because we want to maintain the original background values in the dropdown. So for example
SET .MyProperty = .pyLabel <— (the background value)
SET .pyLabel = .pyLabel + “” ← (The displayed value)
Use the Datapage as the source in the Dropdown UI.
Please see the attached screenshots.
Maybe it does exist an option to prevent localization of dropdown displayed values but I don’t know at this moment. I hope someone can confirm if that exists.