Select to view content in your preferred language

Need to enable editing of a Survey123 in a related table of a feature layer by the selection of a point.

292
2
04-02-2025 06:05 PM
StevenPorson
Emerging Contributor

I created a Survey123 form that I want folks to use. I have a workflow where mobile users drop a point in fieldmaps and link to a survey, which is stored in a related table. However, I need other users to be able to click on those points in a web map or experience and finish editing the linked survey. I can link the first user through to the survey and back to the feature layer, but I can't seem to get my secondary users into the same survey.

I know I can have editors use the Edit widget, but I would like to have them open the Survey123 app. In the current web experience the survey widget is unable to find the survey because it is in a relate, so users cannot click a point on the map and pull up the survey.

It sounds like what I need to do is have a second link in the web map popup for editing the survey and include '?mode=edit' in the url, but I would also need to clarify in the url the globalID of the child record in the related table, which is not stored in the parent feature layer. So, I would like to pass the related table's GlobalID into the parent layer once the survey is generated, but I am struggling to write arcade that can do that. 

Am I on the right track with this?

0 Kudos
2 Replies
StevenPorson
Emerging Contributor

Made some progress, but I am stuck on how to route into the submitted survey. I have inbox enabled, but get the message 'Survey ID (global ID of the record in the related table) does not exist or is inaccessible.'

I put the following arcade into a popup html link. 

//Find the child GlobalID
var relatedid = FeatureSetByRelationshipName($feature,"EWP_Combined",['GlobalID'],false)
for (var glob in relatedid){
  var childglob = glob.GlobalID}
 
//Put the child GlobalID into a URL
var urlsource ='arcgis-survey123://?';
var params = {
  itemID: childglob,
  mode: 'edit',
};
return urlsource  + UrlEncode(params);
0 Kudos
StevenPorson
Emerging Contributor

Found the solution here

0 Kudos