Select to view content in your preferred language

Custom Survey123 URL with Field Maps Callback

2482
2
Jump to solution
01-31-2022 07:23 AM
erica_poisson
Frequent Contributor

Hi - 

I am migrating some workflows from Collector to Field Maps and I am running into issues with my callback URL parameters.

The workflow:

  1.  Click a polygon feature in Field Maps to view pop-up. Custom pop-up displays URL to launch Survey123 form and pass certain attributes to Survey123. 
  2. Survey is completed by user. When user submits survey, Field Maps re-opens via callback to specified map. 

This worked very well with Collector and was simple to configure. With Field Maps, I am getting some weird errors, even though I am following the documentation on both Survey123 and Field Maps help pages. 

If I use a URL formatted like below, I get an error when attempting to open Survey123 from the URL. The error is in Survey123 and says "Error Unpacking":

 https://survey123.arcgis.app/?itemID=10242016ba5b4ab3883bf40bb8ae76fb&field:Ag_Guid={GlobalID }&callback=https://fieldmaps.arcgis.app /?referenceContext=open&itemID=6b34dffb1c0b41b3907c61a97d0b1e4a

This same error occurs when I modified the URL to be something like this:

https://survey123.arcgis.app/?itemID=10242016ba5b4ab3883bf40bb8ae76fb&field:Ag_Guid={GlobalID}&callback=https://fieldmaps.arcgis.app://?referenceContext=open&itemID=6b34dffb1c0b41b3907c61a97d0b1e4a  

https://survey123.arcgis.app/?itemID=10242016ba5b4ab3883bf40bb8ae76fb&field:Ag_Guid={GlobalID}&callback=https://fieldmaps.arcgis.app//?referenceContext=open&itemID=6b34dffb1c0b41b3907c61a97d0b1e4a

If I use the callback URL without the referenceContext parameter included, the callback seems to work, but does display an on-screen error when returning to Field Maps; this happens with either of the formats below:

https://survey123.arcgis.app/?itemID=10242016ba5b4ab3883bf40bb8ae76fb&field:Ag_Guid={GlobalID }&callback=https://fieldmaps.arcgis.app ://?itemID=6b34dffb1c0b41b3907c61a97d0b1e4a

https://survey123.arcgis.app/?itemID=10242016ba5b4ab3883bf40bb8ae76fb&field:Ag_Guid={GlobalID }&callback=https://fieldmaps.arcgis.app /?itemID=6b34dffb1c0b41b3907c61a97d0b1e4a

Error:

erica_tefft_0-1643642378011.png

I did check and the Survey123 data submits properly. I am returned to the proper map in Field Maps, but see this error each time. 

Does anyone have advice on how to resolve this issue?

Thank you,

Erica
1 Solution

Accepted Solutions
erica_poisson
Frequent Contributor

You were correct - I had not realized this was required now with Field Maps, as it wasn't when I'd previously configured these types of URLs for Collector. 

I was able to get some help via the Field Maps Questions and you can see the answer here - https://community.esri.com/t5/arcgis-field-maps-questions/custom-survey123-url-with-field-maps-callb... 

Erica

View solution in original post

2 Replies
DougBrowning
MVP Esteemed Contributor

My guess would be the URL encoding.  See here and it may help   https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-send-data-back-from-surv...

 

0 Kudos
erica_poisson
Frequent Contributor

You were correct - I had not realized this was required now with Field Maps, as it wasn't when I'd previously configured these types of URLs for Collector. 

I was able to get some help via the Field Maps Questions and you can see the answer here - https://community.esri.com/t5/arcgis-field-maps-questions/custom-survey123-url-with-field-maps-callb... 

Erica