Survey123 Custom URL and fields with special characters.

2182
9
01-09-2018 09:01 AM
BrysonKoziell
New Contributor III

Noticing strange behavior when passing attribute values through the url that have apostrophes, commas, or other special characters.  Also, behavior is different between iPad and Desktop.

Trying to pass a description field that looks like this;

On west side of road. 140' south of intersection, 750' before cul-de-sac at end of Settlers.

When I pass to Survey123 form on Desktop it looks like this;

On west side of road. 140' south of intersection %2C 750' before cul-de-sac at end of Settlers.

When I pass to Survey123 form on iPad it looks like this;

On west side of road. 140

On Desktop it fails to recognize the %2C as a comma.  On the iPad it stops at the apostrophe and all subsequent fields do not get populated.  

0 Kudos
9 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Bryson,

This has also come up from other users recently- seehttps://community.esri.com/message/740291-re-survey123-converting-characters-to-code .  We will be looking to correct this behavior in a future release of Survey123.

JMitchell
New Contributor III

Hi James,

Has there been any progress made in resolving this behavior recently?  I am trying to create a form that our City's engineering group can use to do inspections, but some of the fields being passed to populate information about the assets being inspected contain special characters like apostrophes and commas etc.  This causes the form to cut off information like Bryson described.

I have tried to research whether this issue has been fixed or is still under consideration, but have been unable to find anything conclusive.

Thanks,

Jared

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Jared,

This was resolved in version 3.0 of Survey123.

0 Kudos
JMitchell
New Contributor III

Hi James,

Thanks for the reply.

I am still seeing this behavior.  The Survey123 app on my Android device is version 3.1.159 and the Survey123 Connect application on my desktop which I used to create the form says version 3.0.142.  

I have a webmap that can be accessed via collector that shows permit locations with a popup that includes a custom URL link to the Survey123 form that I set up.  This link populates read-only fields showing several of the permit attributes on the inspection form for reference, but the comment/description field gets cut off at the first special character...

so a note that says: 

Install gas service (3'x5').

will show up on the form as:

Install gas service(3

If the issue as described by the OP of this thread has been resolved, what could be the cause for the issue on my end?

Any guidance on this would be much appreciated!

Thanks,

Jared

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Jared,

Thanks for the feedback. My response on this being fixed referred specifically to the first issue that was described (%2C = , ). The shortened text is an issue is in Collector - it is ending the URL at the first quote, hence the additional text does not get into Survey123.

0 Kudos
JMitchell
New Contributor III

Thanks James.  The issue is indeed caused by Collector; following the links from within a Web App Builder application to Survey123 allows the full string of characters to carry over.

I will use this workaround.

0 Kudos
JMitchell
New Contributor III

Hi James,

I opened a new thread for a new issue I have run into, but I figured I would link to it here as it relates to the same form that I was testing the special character case with.

https://community.esri.com/message/818108-survey123-form-accessed-via-custom-url-loses-functionality... 

0 Kudos
MalloryGill
New Contributor III

Has there been any resolution to the second behavior in the original post? I'm having the same issue in a Survey123 Form - where an apostrophe is passed through as an attribute value by the URL parameters and the Survey 123 form stops populating anything else after that. This behavior doesn't show up in the windows version of the Survey123, but does on the iPad and android devices we've tested.

0 Kudos
MalloryGill
New Contributor III

For anyone still having issues with the second example where an apostrophe causes the custom URL to break and stop auto-populating subsequent fields - Lance Cole‌ provided a great workaround. You can read his full response here Custom URL from Collector Passing Attribute Values with Special Characters to Survey123‌.