Field Maps and Survey123 integration help

979
4
Jump to solution
06-28-2023 02:55 AM
cat206
by
Frequent Contributor

Hi All,

I'm wondering if someone could shed some light into where I've gone wrong with my custom URL to integrate Field Maps with Survey123 please

I have configured a URL link pop up with the below:

https://survey123.arcgis.app?itemID=db254a64700f4892becca939a32b82f1&field:ASSET_REF={ASSET_REF}&field:SUPP_SCH={SUPP_SCH}&field:Address={Address}&field:what3words={what3words}&callback=https://fieldmaps.arcgis.app?itemID=ecd711f706fb4842a08ba6e74c1a1af2&center=${Latitude},${Longitude}  

Most of it working fine, it send them to Survey123 and auto completes the correct fields, however, my Geopoint question at the top of my form is still panning to the users location, rather than the location of the asset within Field Maps, so the &center=${Latitude},${Longitude}  part is not working properly. I am currently using this format for the lat and long fields

cat206_0-1687945844686.png

Also once the users have completed the form and gets sent back to the Field Maps app, they are receiving this error message:

cat206_1-1687946092894.jpeg

 

Does anyone have any idea where i've gone wrong please?

 

 

0 Kudos
1 Solution

Accepted Solutions
cat206
by
Frequent Contributor

Hi All, 

I needed to add in the ?referenceContext=open into the URL but i was getting an Unpacking error. I've found this post Solved: Custom Survey123 URL with Field Maps Callback - Esri Community

I used the about ecoding website and followed the solution by encoding the callback URL:

https://fieldmaps.arcgis.app/?referenceContext=open&itemID=ecd711f706fb4842a08ba6e74c1a1af2  

into this:   https%3A%2F%2Ffieldmaps.arcgis.app%2F%3FreferenceContext%3Dopen%26itemID%3Decd711f706fb4842a08ba6e74c1a1af2 

And its finally worked! Hooray 

View solution in original post

4 Replies
cat206
by
Frequent Contributor

Hi All, Just to let you know I've managed to fix the Centre Parameter by moving it down the URL before the call back, silly mistake on my part! I also removed the $ and it works perfectly.

 https://survey123.arcgis.app?itemID=db254a64700f4892becca939a32b82f1&field:ASSET_REF={ASSET_REF}&field:SUPP_SCH={SUPP_SCH}&field:Address={Address}&field:what3words={what3words}&center={Latitude},{Longitude}&callback=https://fieldmaps.arcgis.app?itemID=ecd711f706fb4842a08ba6e74c1a1af2  

Now just need to fix the error message...

 

0 Kudos
cat206
by
Frequent Contributor

Hi All, 

I needed to add in the ?referenceContext=open into the URL but i was getting an Unpacking error. I've found this post Solved: Custom Survey123 URL with Field Maps Callback - Esri Community

I used the about ecoding website and followed the solution by encoding the callback URL:

https://fieldmaps.arcgis.app/?referenceContext=open&itemID=ecd711f706fb4842a08ba6e74c1a1af2  

into this:   https%3A%2F%2Ffieldmaps.arcgis.app%2F%3FreferenceContext%3Dopen%26itemID%3Decd711f706fb4842a08ba6e74c1a1af2 

And its finally worked! Hooray 

DougBrowning
MVP Esteemed Contributor

What I do is just have the callback be &callback=https://fieldmaps.arcgis.app  This will simply flip back to the app.  Since they just launched the URL they are already on the point so no need to tell Field Maps to zoom to it.  It simply returns to where they were.

0 Kudos
BryceHancock
Frequent Contributor

Hi Doug, I have an integrated Field Maps/Survey123 app with configuration you specified above. But when the user clicks submit in Survey123, Field Maps reopens to the popup with the feature highlighted and editable. I had a user then click to add a feature, without closing the popup, so they overwrote the same feature. Is there a way to encode the callback to close the popup to save the feature, when returning to Field Maps from Survey123? If one new user made this mistake, I'm sure others will. Alternatively, I could put large bold red text in the popup, prompting the user to close it before collecting another feature.

0 Kudos