Select to view content in your preferred language

jr-choice-name and formatting

1917
1
08-09-2019 12:07 PM
JacobLougee
New Contributor

I want my selections to be formatted

Common Name - Scientific name

and I planned to use jr-choice-name to populate my species question, but I discovered that, if I use formatting, the multiple choice option looks correct and the species field is populated as

Common Name - < i >Scientific name < / i >

Does anyone know of a workaround? I don't want the jr-choice-name to include any formatting tags like that.

0 Kudos
1 Reply
IsmaelChivite
Esri Notable Contributor

Hi. The jr-choice-name() function gets your choice label as is. If you include HTML formatting in your label, you will get it untouched. I can think of two options:

* Use the substr() function to eliminate the first 3 and last 4 characters. See details in Quick reference—Survey123 for ArcGIS | ArcGIS 

* Stop using jr-choice-name() and use pulldata() against a table where you can get a clean scientific name string out of the choice value.

Hope this helps.