I’m running into an issue when trying to open a Survey123 record from a Field Maps Task Layout. Hoping someone can help me figure out what’s going on.
What I’m trying to do:
I have a Survey123 form (item ID fe89e89f9ad0409b881b5406acb603ad) and a feature layer that includes a GlobalID field. In the new Field Maps Task Layout, I want to add a link that opens the Survey123 field app (not the web browser) and goes directly to the related record in edit mode.
Previously, in a standard popup, this web link worked perfectly:
https://survey123.arcgis.com/share/fe89e89f9ad0409b881b5406acb603ad?mode=edit&globalId={GlobalID}
Now, inside the Task Layout, I’ve tried multiple Arcade expressions, but all of them return an error saying “Survey link is invalid or requires an app that isn’t installed.” I've logged out, reloaded the map, and force closed the app between tries.
Here are the different versions I’ve tried so far:
var baseURL = "https://survey123.arcgis.com/share/fe89e89f9ad0409b881b5406acb603ad?mode=edit&globalId=
"
var gID = StandardizeGuid($feature.GlobalID, 'digits-hyphen')
return baseURL + gID
var baseURL = "https://survey123.arcgis.app?itemID=fe89e89f9ad0409b881b5406acb603ad&action=edit&globalId=
"
var gID = StandardizeGuid($feature.GlobalID, 'digits-hyphen')
return baseURL + gID
var baseURL = "arcgis-survey123://?itemID=fe89e89f9ad0409b881b5406acb603ad&action=edit&globalId="
var gID = Text($feature.GlobalID)
return baseURL + gID
I'm wondering what URL scheme the new Task Layouts use. It would be great if Esri had some examples on this.
Hi @apgis16 - Just to confirm your workflow: you have a map in Field Maps with a task-enabled layer, and you would like to open the same feature in a corresponding survey in the Survey123 mobile app. Is that correct?
If so, then your first example is a link to the web survey, not the mobile app. And I believe your other two example baseURL links are missing two parameters:
If you adjust your script, it should look like:
var baseURL = "https://survey123.arcgis.app?itemID=fe89e89f9ad0409b881b5406acb603ad&action=edit&update=true&q:globalId="
var gID = StandardizeGuid($feature.GlobalID, 'digits-hyphen')
return baseURL + gID
The following options should also work:
https://survey123.arcgis.app?itemID=fe89e89f9ad0409b881b5406acb603ad&action=edit&update=true&q:globalId={GlobalID}
return "https://survey123.arcgis.app?itemID=fe89e89f9ad0409b881b5406acb603ad&action=edit&update=true&q:globalId=" + $feature.GlobalID
return "arcgis-survey123://?itemID=fe89e89f9ad0409b881b5406acb603ad&action=edit&update=true&q:globalId=" + $feature.GlobalID
Please see the following resources for more info on how to craft Survey123 URLs:
Hi, I tested all of these and the 1st, 3rd, and 4th still return me the same error as before. The second one opens up the S123 app but shows me a new error: "Cannot perform query. Invalid query parameters. Code 400". Do I need to have the inbox enabled? Right now I have the sent folder enabled.
@apgis16 - Yes, you should have the Inbox enabled. See Prepare to edit existing survey data for more info.
Can you confirm the following:
I have it enabled now and it's doing the same thing.
I'll also note that the survey has a repeat section within it. I followed the instructions for settings here:
How To: View and Edit Existing ArcGIS Survey123 Records Using the Survey123 Field App
Prepare to edit existing survey data—ArcGIS Survey123 | Documentation
I have "query allowUpdates=true" in the bind::esri:parameters column for the repeat section