CallBack giving error

452
3
Jump to solution
03-06-2023 06:44 AM
kapalczynski
Occasional Contributor III

I am trying to launch a Survey123 Form from Field Maps

When the form is submitted I want to return to the Field Maps App where I launched from.

  1. It opens the survey form correctly
  2. it then tried to go back to the Field Map App and throws error

"Unable To Open Link - The referenceContext parameter is missing"

Thoughts....

EDIT:  I can hit ok on the Error and it goes away and it appears the record was saved in Survey123... I can go back to my work in Field Maps ok but not sure why I am getting the error

 

<a href="arcgis-survey123://?itemID=2a871f061e9a44728377ee83XXXXXXXX&amp;
field:PK={GLOBALID}&amp;
field:PRE={PRE}&amp;
field:PNUM={PNUM}&amp;
field:ID={ID}&amp;
callback=arcgis-fieldmaps://?itemID=b200d9a18d054f49bc155d99XXXXXXXX" 
rel="nofollow ugc">Open Survey</a>

 

 

 

0 Kudos
1 Solution

Accepted Solutions
kapalczynski
Occasional Contributor III

Seems to be working now... no idea... maybe a really small syntax issue I am not seeing

 

<a href="arcgis-survey123://?itemID=2a871f061e9a44728377ee83XXXXXXXX&amp;field:PK={GLOBALID}&amp;field:PRE={PRE}&amp;field:PNUM={PNUM}&amp;field:ID={ID}&amp;callback=arcgis-fieldmaps://? itemID=b200d9a18d054f49bc155d99XXXXXXXX" rel="nofollow ugc" target="_blank">Open Inspection Punch List Survey</a>

 

 

View solution in original post

0 Kudos
3 Replies
kapalczynski
Occasional Contributor III

Tried something like this and now the Survey123 form will NOT open and throws error in Survey123 "Error Unpacking"

Note: I hit return in the code below to create separate lines so you can read easier... Its all one statement in my code

 

 

 

<a href="arcgis-survey123://?itemID=e1824895dc474816953af814XXXXXXXX&amp;
field:PK={GLOBALID}&amp;
field:PRE={PRE}&amp;
field:PNUM={PNUM}&amp;
field:ID={ID}&amp;
callback=arcgis-fieldmaps://?referenceContext=center&itemID=e1824895dc474816953af814XXXXXXXX" 
rel="nofollow ugc" 
target="_blank" >Open Log Sheet Survey</a>

 

 

 

0 Kudos
kapalczynski
Occasional Contributor III

Seems to be working now... no idea... maybe a really small syntax issue I am not seeing

 

<a href="arcgis-survey123://?itemID=2a871f061e9a44728377ee83XXXXXXXX&amp;field:PK={GLOBALID}&amp;field:PRE={PRE}&amp;field:PNUM={PNUM}&amp;field:ID={ID}&amp;callback=arcgis-fieldmaps://? itemID=b200d9a18d054f49bc155d99XXXXXXXX" rel="nofollow ugc" target="_blank">Open Inspection Punch List Survey</a>

 

 

0 Kudos
ColinLawrence
Esri Regular Contributor

Hi @kapalczynski ,

When passing an itemID (to a Web Map) to open in Field Maps you must include a referenceContext to define what the app should do. If you just want to open the specified web map you could use the referenceContext=open to simply open the map. There are examples of this and others options in the doc here

You also appear to be using the legacy custom URL scheme (app://?) vs the universal app link format (https://app  ). Support for additional parameters may be limited within Field Maps when using that formatting. If you do switch to the universal scheme you, will need to encode the portion of the link that is within the callback or the callback will not be executed. I hope this helps!

Regards,
Colin
0 Kudos