Hi,
I am currently working with K2 Designer and facing an issue with how data is displayed in a List View. Specifically, I have a column that contains "Y" or "N" values (representing Yes and No) from my data source, and I would like to display "Yes" and "No" instead. However, I am unsure how to achieve this transformation in the List View.
I have a Data Label control in a List View called Option Enabled Data Label1
, which is bound to a field that holds "Y" or "N" values.
I’ve tried using an expression like this to display "Yes" when the value is "Y" and "No" when the value is "N":
if ( OptionEnabled] == "Y") { return "Yes"; } else { return "No"; }
Unfortunately, this does not work as expected, and the raw expression is displayed in the List View instead of the "Yes" or "No" values. I have tried enclosing the code with the <script> tag but still doesn't work as expected.
I’m unsure of the next steps and would greatly appreciate any guidance on how I can resolve this issue. Thank you in advance for your help!