callback survey123 from collector

796
6
03-26-2020 04:09 AM
CharlieFoor
New Contributor

What is the correct syntax for using a callback to send user back to Survey123 after collecting a spatial feature in Collector?? I figured out how to send user to Collector from Survey123, but cannot figure out how to send user back to Survey123 after collection of feature.....

0 Kudos
6 Replies
ColinLawrence
Esri Regular Contributor

Hi Charlie,

A way to do this would be to use the callback parameter with the URL scheme, like this:

arcgis-collector://?referenceContext=addFeature&itemID="itemid"&featureSourceURL="fsurl"&featureAttributes="encoded attributes"&callback=arcgis-survey123://

you can also add a prompt for the user with a custom message, like so:

callbackprompt=Return+to+Survey123&callback=arcgis-survey123://

I hope this helps!

Regards,

Colin

CharlieFoor
New Contributor

Hi Colin,

Thanks for your response!! Does your example take one back to the starting survey, or does it take one back to the general application of Survey123?? Peace.

Charlie

0 Kudos
ColinLawrence
Esri Regular Contributor

Charlie,

It should take you back to the previous state the app was in which in this case should be the survey that was open. I do not believe there is a way to specify a certain screen to open with the callback. 

Regards,

Colin

0 Kudos
AlinaTaus
Occasional Contributor

I am not having any luck with the callbackprompt piece. What is it suppose to look like from the user side? Using this on an iPad. I got the callback part to work, but as soon as I submit the Survey it just immediately switches to Collector, I don't see a message. I am using the callback to go back to Collector after a Survey123 is submitted. So my URL looks like this: 

&callbackprompt=Return+to+Collector&callback=arcgis-collector://?itemID=<CollectorItemID>

Thanks! 

0 Kudos
ColinLawrence
Esri Regular Contributor

Hello Alina,

In your example, Survey123 is the application parsing the URL; I am not sure that Survey123 supports the callbackprompt parameter at this time which could be why you do not see the message. In an example I setup that goes from Explorer to Collector, I put the message "this is a callback message" for the callbackprompt parameter. 

AlinaT
by
New Contributor III

Colin,

Thank you for getting back to me. At least the callback works, that's the most important piece.

Alina 

0 Kudos