Select to view content in your preferred language

Edit existing records with Survey123 Mobile App

340
3
Jump to solution
05-20-2024 01:33 PM
ajohnson_wsb
New Contributor II

Hi everyone,

I'm looking for an option to edit existing records via the Survey123 Mobile App.

The data is coming from a web map within ArcGIS Enterprise and currently we are using url parameters to push data from Field Maps to Survey123. The goal is to update attribute data using a Survey123 form built on top of a feature service (service used in Field Maps). The workflow I'm looking for is very similar to what is identified here in Esri's documentation, specifically the workflow of edit in web app, where the url parameter is something like https://survey123.arcgis.com/share/xxxx?mode=edit&globalId={globalid}. I can use this url and it works well editing in the web app but does not work in the mobile app.

I've tried using the url parameters shown here to edit existing records action=edit and update=true but I seem to be getting the inbox to open instead. If anyone has any insights I would appreciate it.

0 Kudos
1 Solution

Accepted Solutions
ajohnson_wsb
New Contributor II

I figured out how to implement this workflow. Thank you @ChristopherCounsell for the assistance.

The url I ultimately needed was this: arcgis-survey123://?itemID=xxxxx&action=edit&q:globalid={GlobalID}&update=true&callback=https://fieldmaps.arcgis.app

This allows me to update the existing data within Field Maps while also utilizing the added functionality of the Survey123 mobile forms.

 

View solution in original post

0 Kudos
3 Replies
ChristopherCounsell
MVP Regular Contributor

The simplest way to do this is create an Arcade expression, encode your parameters, and then embed the expression into the text as a hyperlink. I would always recommend this as it's cleaner, you avoid URL encoding issues, Arcade validates the expression, and you can comment out undesired elements like the callback.

Note you can't pass through additional field value parameters in the inbox. Calculations and calculationMode parameters can force updates.

var urlsource = 'arcgis-survey123://?';

var params = {
  // survey ID goes here
  itemID: 'xxxxxxxxxxxxxxxxxxxxxxx',

  action: 'edit',

  'q:globalId': $feature.GlobalID,

  folder: 'inbox',
  
  // this parameter updates the inbox (necessary if user has not downloaded)
  update: 'true',
  
  // optional callback to field maps.
  // callback: 'https://fieldmaps.arcgis.app'

};

return urlsource + UrlEncode(params);

 

https://doc.arcgis.com/en/survey123/desktop/get-answers/editexistingdata.htm#ESRI_SECTION1_47C2CB834...

https://doc.arcgis.com/en/survey123/desktop/create-surveys/prepareforediting.htm

Don't forget to disable Sent folder to avoid issues + configure repeats e.g. allowUpdates=true

0 Kudos
ajohnson_wsb
New Contributor II

Hi Christopher,

Thanks for helping with this. I think this is close but this arcade expression opens the inbox on the survey123 app. In my scenario I'm not editing data in the inbox or sent folder, I'm looking to edit existing attribute data. Similar in way that you would edit existing data in Field Maps but in our situation we need the capability of selecting multiple questions in our workflow (currently not available in Field Maps).

0 Kudos
ajohnson_wsb
New Contributor II

I figured out how to implement this workflow. Thank you @ChristopherCounsell for the assistance.

The url I ultimately needed was this: arcgis-survey123://?itemID=xxxxx&action=edit&q:globalid={GlobalID}&update=true&callback=https://fieldmaps.arcgis.app

This allows me to update the existing data within Field Maps while also utilizing the added functionality of the Survey123 mobile forms.

 

0 Kudos