Custom Survey123 URL with Field Maps Callback

4197
12
Jump to solution
02-01-2022 05:39 AM
erica_poisson
Occasional Contributor III

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-1643722751457.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
0 Kudos
12 Replies
JessicaJThompson
Occasional Contributor II

Thank you for the examples @Anonymous User ! 

One of my surveyors has put a wrench in all of my URLs by having a Dell tablet that runs on Microsoft Operating system (all the rest use Ipads). There is no field maps app to download for this. Any ideas if a callback could work for a WebApp Builder? And if it might work, how would the callback be structured...?

Current workflow is 

  • Select an asset in webmap
  • click on Survey Hyperlink/Custom URL in the pop-up 
  • Survey opens in Survey123 app with data from map populating geopoint and 2 fields
  • Submit survey
  • Exit survey123 app
  • Reopen webmap

 

This particular surveyor is not the most tech savvy and hesitant to move from paper surveys to a digital platform. I am trying to make it as seamless as possible for her. 

 

Thank you for any thoughts on this!

Jessica

 

0 Kudos
by Anonymous User
Not applicable

Just wondering how pop-ups are being configured to include the URL with additional parameters. Is it stored in the attribute table? I believe pop-ups could be configured to link to surveys etc. in map viewer classic but I am unaware of how they can be included in map viewer (it's been a while since I've had to use URL parameters).

0 Kudos
GeorgiannaStrobin
New Contributor II

This article helped me when I was configuring the custom URLs to link Survey123 and Field Maps for my organization: https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm