Hi Team,
Please find attachment
I'm working in 16.1. I have a requirement to display the dropdown values in the below format.
I used the below code, but its not giving the exact result as needed.
when you run the code it is displaying in the dropdown values as AA|BB|CCC|DDD.......
but I am expecting the below format
AA
BBB
CCC
DDD
load( local!dpvalues,a!sectionLayout( firstColumnContents: { a!dropdownField( label:"TEST", labelPosition:{}, placeholderLabel:"---", choiceLabels:{"AA|BB|CC|DD|FFF|GG|HHH"}, choiceValues:{"AA|BB|CC|DD|FFF|GG|HHH"}, value:local!dpvalues, saveInto:local!dpvalues ) }, secondColumnContents: { /* Add components here for a two-column section */ }, validations: {}))
Thanks,
Discussion posts and replies are publicly visible
Hi rameshm468,
Are you looking for the something similar to how the below code works?
load( local!dpvalues, local!choiceList: split({"AA|BB|CC|DD|FFF|GG|HHH"}, "|"), a!sectionLayout( firstColumnContents: { a!dropdownField( label:"TEST", labelPosition:{}, placeholderLabel:"---", choiceLabels:local!choiceList, choiceValues:local!choiceList, value:local!dpvalues, saveInto:local!dpvalues ) }, secondColumnContents: { /*Add components here for a two-column section */ }, validations: {} ) )
I would just add that if you want to manually create a string array, this is not the correct syntax (unless it's being given to you from elsewhere, in which case the previous replies will work). But otherwise you probably want: {"AA", "BB", "CC", "DD", "FFF", "GG", "HHH"}