Select to view content in your preferred language

Edit existing records with Survey123 Mobile App

1450
5
Jump to solution
05-20-2024 01:33 PM
ajohnson_wsb
Occasional Contributor

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
Occasional Contributor

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
5 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
Occasional Contributor

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
ahargreaves_FW
Frequent Contributor

@ChristopherCounsell when you say:

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

is this why if I:

  1. Auto update the inbox using: &folder=inbox&update=true
  2. Hunt out an existing record using: &filter={WORKORDER_NUMBER}
  3. Allow the record to be updated using: &action=edit

I am unable to pass in field values to update this existing record using: &field:FIELD1={ATTRIBUTE1}  ...?

Even if I include: &recalculate=field:FIELD1 ...?

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Recalculate is a valid parameter for the WEB app

https://doc.arcgis.com/en/survey123/get-started/integrate-launchwebapp.htm

It's not listed nor as far as I'm aware functional for field app.

https://community.esri.com/t5/arcgis-survey123-ideas/support-url-custom-url-field-parameter-for/idi-...

So yes, fields aren't supported for what you are saying for the field app. There is the calculationMode, which is not URL based and would apply to collection and edit.

Please vote for the idea.

0 Kudos
ajohnson_wsb
Occasional Contributor

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