Text after Symbol is not Passed to Survey123 field from FieldMaps reference Layer

518
1
Jump to solution
02-23-2023 04:15 PM
Christman
New Contributor II

I have a Survey123 form that is opened from FieldMaps and is passed data via a custom URL from a reference layer. The work flow: FieldMap w/reference layer-> select point with existing data-> pop-up->Survey123 form where Survey fields are pre-populated with field from the layer in the FieldMap. When my "Description" field is populated with a string of text the text is cut-off after any symbol ( ", &, ., -). I want the whole description to pass over into the Survey1243 form without losing the text from the "Description" field.

Is there a way to force Survey123 or FieldMaps to receive/pass the whole string without losing everything after a symbol? Do I need to change the field type fort this to work? It is not ideal for my workers to produce descriptions without punctuation in this case.

 

Thanks

Liam

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

The URL is composed from the field value. If the field value breaks the validity of the URL, you'll have issues like what you are seeing.

For these moments, you can URL encode the value using ArcGIS Arcade at the map layer level. Add an expression to encode the description value so it's passed into the custom URL validly.

https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm#ESRI_SECTION1_7E0A66ACA8504...

https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode

Instead of referencing the {field}, you'll reference the {expression/expr0} or similar which will return the encoded value into the URL.

View solution in original post

1 Reply
ChristopherCounsell
MVP Regular Contributor

The URL is composed from the field value. If the field value breaks the validity of the URL, you'll have issues like what you are seeing.

For these moments, you can URL encode the value using ArcGIS Arcade at the map layer level. Add an expression to encode the description value so it's passed into the custom URL validly.

https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm#ESRI_SECTION1_7E0A66ACA8504...

https://developers.arcgis.com/arcade/function-reference/text_functions/#urlencode

Instead of referencing the {field}, you'll reference the {expression/expr0} or similar which will return the encoded value into the URL.