Use this board to ask questions or have discussions with other Rich Displays users.
rads
New User
Posts: 17 Joined: Thu Nov 08, 2018 2:08 am
First Name: Rainer
Last Name: aus dem Spring
Company Name: iks
Zip / Postal Code: 40699
Country: Germany
Contact:
Post
by rads » Wed May 11, 2022 4:53 am
According to the doc
umentation Choice values property may be populated with
"A simple list of values separated by just a comma (i.e. Option 1, Option 2, Option 3, etc...)."
Now one of our users had the idea to create a new record with a comma in the key.
Of course, the select box providing records from this table goes Amok :).
Any idea anybody?
Emily
Profound Logic Staff Member
Posts: 89 Joined: Tue Jun 21, 2016 8:30 am
First Name: Emily
Last Name: Seage
Company Name: Profound Logic
Contact:
Post
by Emily » Wed May 11, 2022 9:00 am
Hi rads,
This problem can be solved by use of square brackets ([]) and quotation marks. See below for an example.
The 'choices' property is setup like so (notice that 2 of the options have commas included):
image1.png (2.55 KiB) Viewed 3450 times
Running the program results in the following for the select box:
image2.png (4.88 KiB) Viewed 3450 times
If you are using a bound field for this, you would do something similar in your RPG program.
Hope that this helps!
Emily Seage
Support Team Lead
Scott Klement
Experienced User
Posts: 2711 Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin
Post
by Scott Klement » Wed May 11, 2022 6:02 pm
Using the technique that Emily posted, if you run into any other special characters that need to be escaped (for example, double quotes in the string, or square brackets, etc) they'd be escaped according to the standard for a JSON array. Details are here:
https://www.json.org/json-en.html
For example:
Code: Select all
[ "Rainer", "Emily", "Scott \"Crazy Guy\" Klement" ]
rads
New User
Posts: 17 Joined: Thu Nov 08, 2018 2:08 am
First Name: Rainer
Last Name: aus dem Spring
Company Name: iks
Zip / Postal Code: 40699
Country: Germany
Contact:
Post
by rads » Thu May 12, 2022 3:13 am
Excellent :)
Is this mentioned in the documentation?
If not, please consider to mention this in the documentation for select boxes.
Thank you,
Rainer
rads
New User
Posts: 17 Joined: Thu Nov 08, 2018 2:08 am
First Name: Rainer
Last Name: aus dem Spring
Company Name: iks
Zip / Postal Code: 40699
Country: Germany
Contact:
Post
by rads » Thu May 12, 2022 4:11 am
Why on earth is "dokumentation" replaced by "***"?
Scott Klement
Experienced User
Posts: 2711 Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin
Post
by Scott Klement » Thu May 12, 2022 9:09 am
I was wondering the same thing about *** -- very strange
BFoster
Profound User
Posts: 50 Joined: Fri May 24, 2019 6:26 am
First Name: Ben
Last Name: Foster
Company Name: Manhattan Assurance Company
Contact:
Post
by BFoster » Wed Jul 06, 2022 7:24 am
TFM? ... as in RTFM?
Users browsing this forum: No registered users and 3 guests