Survey123 Connect: Editing survey responses with repeats

583
1
Jump to solution
09-06-2022 01:08 PM
MichGeo1
New Contributor

Hello, 

I am working on a survey with a repeat that needs to allow editing after the respondent has submitted their survey responses. So far, using URL parameters has enabled editing access when I type it in by hand, the only issue is when I try to use the link in a Dashboard or a Pop-up it'll pull the GlobalId from the repeat instead of the entire survey itself. 

Example of the URL (with the survey id/portal url and globalid omitted):  https://survey123.arcgis.com/share/ <Survey ID Here> ?portalUrl= <Portal URL Here> &mode=edit&globalId= <globalId Here> 

Within the Dashboard, I have a list of the responses and when one is selected it'll filter the embedded survey to display the record to be edited. When I replicated the survey/dashboard in an AGOL account, it was set up so that the Source field's ParentGlobalID matched the Target field's GlobalID, but for the survey/dashboard created for the portal there is no ParentGlobalID within the source field (the repeat) that matches the target field / whole survey response. There is a ParentRowId that matches the RowID, but when the dashboards use the RowID for the target field it displays the following error:

Error: Editing is not possible because the globalId parameter was not provided

So to work around this, I tried to create a new field within the survey's repeat to pull to whole survey's GlobalID (which I called parent_row_globbalid), so that I could set the source field to parent_row_globalid and the target field to the GlobalID, but I haven't had any luck finding references to how to pull the GlobalID. I am open to other suggestions, I basically need the URL to be populated with the survey's GlobalID based off of the record selected from within the repeat (to configure a pop-up with the URL) and/or a field within the repeat to pull the GlobalID from the whole survey (to filter the embedded survey within the dashboard).

0 Kudos
1 Solution

Accepted Solutions
MichGeo1
New Contributor

I ended up redoing the survey and I believe I found where the error was. Once you've completed your survey in Connect and are ready to publish, select Publish, Options and make sure "Use global ID parent keys in repeat relationships" is turned on. 

View solution in original post

0 Kudos
1 Reply
MichGeo1
New Contributor

I ended up redoing the survey and I believe I found where the error was. Once you've completed your survey in Connect and are ready to publish, select Publish, Options and make sure "Use global ID parent keys in repeat relationships" is turned on. 

0 Kudos