Custom URL - Survey123/Field Maps - Geopoint and Callback Not working

1277
4
02-22-2022 06:42 AM
JessicaJThompson
Occasional Contributor II

Hello! I appreciate your assistance!

I have been tinkering with a custom URL in a pop-up from a point feature service in Field Maps, opening the survey in S123 App. The URL is is partially working - opens the correct survey, and populates in the SITE_NAME field. 

 

arcgis-survey123://?itemID=____________&callback=https://fieldmaps.arcgis.app/itemID=_______________&field:SITE_NAME={FEATURE_ID}&field:center={X_COORD},{Y_COORD}

 

I have highlighted what isn't working in bold. The callback doesnt work. The center={X_COORD},{Y_COORD} is putting the geopoint at my location instead of using the X_COORD, Y_COORD from the point selected in the map. 

When doing initial tests between a webmap and opening the Surve123 in a browser, we had success without any sort of callback. The issues started happening when adjustments were made to the url to use the Field Maps and Survey123 Apps on an Ipad. 

Thank you thank you!

Jessica

0 Kudos
4 Replies
JoshPharr
New Contributor

I am having a similar issue. I am trying to have a custom URL accessed in the Field Maps app open a survey in the Survey123 app, auto-populate a text and geopoint question, then callback to the Field Maps app after the survey is submitted. 

https://survey123.arcgis.app/?itemID=_______________&callback=https://fieldmaps.arcgis.app/?itemID=_...}

The callback takes me back to the Field Maps app, but each time I receive a closable notification saying: "Unable to open link - referenceContent parameter required".

The text and geopoint questions are auto-populating in the Survey123 app, but for some reason the geopoint is slightly off from the desired location--despite it pulling the same coordinates from the point selected in the Field Maps app.

I am also working on an Ipad. Any help would be greatly appreciated!

Thanks,

Josh

 

0 Kudos
PaulPetersen1
Occasional Contributor

Callbacks are really funky, mostly because you have to URL encode the entire callback for it to work properly. So you'll want to look into URL encoding.

See here: https://community.esri.com/t5/arcgis-survey123-questions/pass-attribute-field-as-url-parameter/m-p/1...

Regarding the error related to referenceContent, I believe that is a required parameter, so you'll need to invoke either addFeature or updateFeature.

PaulPetersen1_0-1645551447453.png

 

0 Kudos
JessicaJThompson
Occasional Contributor II

@PaulPetersen1 , Thank you for your input. I will look into it. I had different survey  I built for another department with the callback working - there were over 30 people using the survey on Ipads in the fall of 2021 for a few months. And they never had issues... 

arcgis-survey123://?itemID=________________&callback=https://fieldmaps.arcgis.app/itemID=_____________&field:ADDRESS={PropAddress_Full}&field:PARCEL_ID={...}

The &field:center={X_COORD},{Y_COORD} is the greater issue at this point. This is being built for one competent inspector. They can live without the callback, but we need the geopoint question working. Any ideas on that?

Thanks again!!

PaulPetersen1
Occasional Contributor

Gotcha. I think you want Latitude, Longitude for the Center parameter. So rather than &field:center={X_COORD},{Y_COORD}it should be &field:center={Y_COORD},{X_COORD}

0 Kudos