List variable support for Input Dialog
Posted: 30 Jul 2014 20:54
When I use the action Input Dialog with the dialog type Single Choice or Multi Choice the option List values is used to supply the menu items.
Right now this option only accepts a string with items separated by commas. Variables are supported, but again only if they are a single string.
I have to construct this string manually even if I have the items in a list variable beforehand.
I have to check if any of the list items contains a comma and remove it.
I have to remove any blanks in front of the items to avoid any unwanted indentation in the Input dialog.
Even if I use the "build-in" support to convert a list into a comma-separated string I have to do some additional processing, like:
Would it be possible to directly support list variables?
If a list item containes a comma it shouldn't matter, the items are already separated.
Leading and trailing spaces should be removed automatically.
Right now this option only accepts a string with items separated by commas. Variables are supported, but again only if they are a single string.
I have to construct this string manually even if I have the items in a list variable beforehand.
I have to check if any of the list items contains a comma and remove it.
I have to remove any blanks in front of the items to avoid any unwanted indentation in the Input dialog.
Even if I use the "build-in" support to convert a list into a comma-separated string I have to do some additional processing, like:
Code: Select all
lstString = replace({lst},'[', ''); // convert to comma-separated string and remove leading '['
lstString = replace(lstString,']', ''); // remove trailing '['
lstString = replace(lstString,', ', ','); // remove leading blanks from items
If a list item containes a comma it shouldn't matter, the items are already separated.
Leading and trailing spaces should be removed automatically.