Hi
i have written code like this but it is showing the data like option1, option 2
but i want to show data like
•option1
•option 2
how can write code for it
Discussion posts and replies are publicly visible
Except of the double "value" this seems good for me. The multiple dropdown will show all selected options like this.
Did you think about using a checkbox field?
no,
i want to show data like this after selecting multiple values
Value is stacked when you are trying to select a value from the component but when it is selected, it will be shown continuously only, without getting stacked. That is how the component behaves.
This looks like a richtextdisplayfield with a bulleted list. While you can display the data like this, I do not know how you want to combine this with the dropdown.
this is how it looks like with below code
Try...
a!localVariables( local!list: split("option1;option2;option3", ";"), local!selection, a!richTextDisplayField( value: { a!richTextBulletedList( items: a!forEach( items: local!list, expression: a!richTextItem( text: fv!item, link: a!dynamicLink( value: symmetricdifference(fv!item, local!selection), saveInto: local!selection ), linkStyle: "STANDALONE", style: if( contains(local!selection, fv!item), { "UNDERLINE", "STRONG" }, "PLAIN" ) ) ) ) } ) )
Hello Kavya, if you see the code written in "choicelabel" is the same as the output so try to change the code into choicelabel: { "Option 1","/n", "Option 2"} I also faced this issue in ici education when writing a program. Change the code this "/n" may satisfy your code if not then try to put "/n" in the "choicevalue" section, thank you.
marilynk3257 said:choicelabel: { "Option 1","/n", "Option 2"}
This would just display the literal text "/n" as a choice option. The multiple dropdown field doesn't care about anything in its display value other than plaintext. There's no way to force it to do what Kavya is requesting, inherently.
But what if we put "/n" without inverted commas or put it in the choicevalue section?
that's not a valid character to Appian. The linebreak character in Appian is written as char(10), but even that is discarded by components that only care about plaintext.