Page 1 of 1
Escaping Commas in Dropdowns
Posted: Mon Feb 13, 2012 6:26 pm
by rcook
Is there a way to escape a comma in the Choices property of a Dropdown? I have a list of values that I'd like to put into a dropdown, but some of them have commas in them and ProfoundUI is splitting them out into separate options.
Re: Escaping Commas in Dropdowns
Posted: Mon Feb 13, 2012 7:29 pm
by David
There is not currently a way -- you'd have to scan/replace them with something else for now. However, we are aware of this problem and are working on a solution.
Re: Escaping Commas in Dropdowns
Posted: Wed Aug 28, 2013 9:24 am
by dieter
We have the same problem. We found out, that you can escape a comma in a Combo-Box by using ,
But this escape characters don't work in a dropdown-box. I hope, Profound can find a solution for this problem. In Germany all numbers are separated from their decimal positions by a comma. My suggestion is to escape control characters by a backslash.
Or is this problem already solved?
Dieter
Re: Escaping Commas in Dropdowns
Posted: Thu Aug 29, 2013 9:44 am
by David
There is now a way to do this by specifying the list in a different format.
Rather than using a comma-separated list, you can use a JSON array. For example:
Code: Select all
["Option One", "Option With , Inside", "Option With \"Quotes\" Inside"]
You'll want to give it like that, including the square brackets.
Since the data is enclosed in quotes, it's no problem to include a comma. If you need to include quotes in the data, it can be escaped as shown above. The above code gives these options:
Code: Select all
Option One
Option With , Inside
Option With "Quotes" Inside
Re: Escaping Commas in Dropdowns
Posted: Thu Aug 29, 2013 9:44 am
by David
Also, I wanted to point out that this format can be used with ALL properties which accept comma-separated lists in PUI.
Re: Escaping Commas in Dropdowns
Posted: Fri Aug 30, 2013 5:30 am
by dieter
David,
thank you! I just tried it out. Works great. Exactly what we need.
Dieter