Pre-Populated Answer for Existing Survey in ArcGIS Experience Builder

282
4
Jump to solution
08-02-2021 08:34 AM
JasminePrater
New Contributor III

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 Regular 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

4 Replies
jcarlson
MVP Regular 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

JasminePrater
New Contributor III

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
JasminePrater
New Contributor III

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 Regular 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