Pre-Populated Answer for Existing Survey in ArcGIS Experience Builder

1422
5
Jump to solution
08-02-2021 08:34 AM
JasminePrater
Occasional Contributor

When I add the Survey Widget to my display, it currently adds a blank survey.  I would like to have a second widget added that contains the same survey, but populates with answers if that survey was already created.  I am setting it up similarly to how Ishmael did in this Dashboard example (https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-embedding-a-survey...).  In that, I have both surveys added, with one being blank and one being pre-populated from a choice in the list on the left.  In that example, the survey is loaded with a URL that selects the Global ID from the map layer shared by the survey and the list.  Is that possible in Experience Builder?  If so, can someone provide some guidance on how I can acquire the pre-populated survey in addition to the blank survey, and how to link it with the List on the left?  Thank you!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Unless something's changed, the Survey widget in EB is for submitting new records to a survey. Connecting data to a survey widget just allows you to use a selected feature's information for you submission, but doesn't let you edit its attributes via the form.

In order to load an existing record in a survey, you'll need to use the Embed widget, similar to how you would in a Dashbaord. Fortunately, if you use dynamic text to pipe in the GlobalID to the URL, it will work just fine.

- Josh Carlson
Kendall County GIS

View solution in original post

5 Replies
jcarlson
MVP Esteemed Contributor

Unless something's changed, the Survey widget in EB is for submitting new records to a survey. Connecting data to a survey widget just allows you to use a selected feature's information for you submission, but doesn't let you edit its attributes via the form.

In order to load an existing record in a survey, you'll need to use the Embed widget, similar to how you would in a Dashbaord. Fortunately, if you use dynamic text to pipe in the GlobalID to the URL, it will work just fine.

- Josh Carlson
Kendall County GIS
JasminePrater
Occasional Contributor

When I try that, I receive an error that states, "Editing is not possible because the record specified by the globalId parameter cannot be accessed."  Currently, I am unable how to figure out how to link the List to the Survey, so when I click the item in the List, it populates the survey with the information.  Both the survey and the List point to the same layer in the map, but I cannot see an option to link them.  In the Dashboard example I previously mentioned, you can "add a new filter action targeting the Embedded Content element," but I have been unsuccessful in performing that action in Experience Builder.  There is no option to link the List to anything other than the Map.  Is this possible?

Edit: this was corrected by using the data icon to select the name of the {GlobalID} field instead of copying and pasting it from the old URL.

0 Kudos
blackhover
New Contributor

I was able to find a way to transfer form one survey to another without having to use just the map to do things. To do this you need to go into the list make the message action a trigger for this make the Record of selection changes the map extent you want with it being the zoom to, though not sure if this a must only thing, and then also add in the Framework for the layer you want with adding in the filter data records. Once this is setup you can then go back to the list click on the one you want to show do your work save unclick it and then click on the next one you want to work on. I hope this helps out.

0 Kudos
JasminePrater
Occasional Contributor

Update on my issue:

After I received the error message in my previous response, I retyped in the "?mode=edit&" manually, then added {GlobalID} from the data selection at the bottom of that box.  Even though they were typed the same way, it seemed to connect the data and solve the editing issue.  The next issue I encountered was that my read-only fields for Work Order ID and Assigned on Date were being rewritten with today's date (both are calculations using dates).  I went back into my XLS and changed those fields from read-only to writeable and republished, and now the form is retaining the original Work Order ID and Assigned on Date fields.  Thank you very much for your guidance that helped me resolve my issue!

0 Kudos
jcarlson
MVP Esteemed Contributor

Oh, good! Sorry I wasn't able to respond earlier and help troubleshoot. I'm glad you got it to work!

- Josh Carlson
Kendall County GIS
0 Kudos