I have a list box that allows multiple selection, the results of which are displayed in another text field. That's working fine, but each result is displayed on a separate line and I'd rather it was displayed on a single line separated with commas.
I don't think I can use "+" because there's no fixed no. of results expected, so I can't specify the result in my script. ie. It's a skills inventory with about 20 selections per list category. The user can select none, one or several from each list. So if for example the user selects: OHS, EMS, ISO & QMS, I'd like these displayed in the text field as:
OHS, EMS, ISO, QMS
instead of:
OHS
EMS
ISO
QMS
I assumed I could use the concat function, but I don't know how to tell it to concatenate the results when they're not fixed. eg. I tried this using FormCalc...
TechResults.rawValue = concat(this.rawValue, ",", Space(1), this.rawValue)
It gave me the result I want, but for only 2 items, so if more than 2 are selected, the remainder are displayed as a vertical list. It also duplicates the 2 items that concatenated in with the vertical list. Is there a way to tell it to concatenate all the results, regardless of how many, without having to specify each one?
Perhaps another alternative is to format the output field such that it will display the text the way I want?
Also, I'm happy to go with a JavaScript solution if that will work better.
You can use this example.
https://share.acrobat.com/adc/document.do?docid=cea07c48-f263-4a05-9efa-23f4cceb6bda
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs