Survey123 and ArcGIS Dashboards are frequently used together. Typically, data collected from a survey is then presented in a dashboard. However, I have been using dashboards increasingly to facilitate survey workflows.
You typically see this with a multi-step survey workflow. For example, a user may submit a survey and then someone else, usually in an office setting, will review the submission and edit it to approve it and/or add additional information.
Survey123 Tricks of the Trade: Embedding a survey in an ArcGIS Dashboard excellently outlines the process, so I won’t rehash it here. I will however add that I prefer to set it up so that the survey only renders when filtered. That way no one accidentally edits the wrong submission.
A list action filtering an embed widget only when selected.
You can prepopulate survey fields using URL Parameters. A dashboard list or table can easily be configured to create those dynamic links for you. The data source used in the dashboard does not need to be the same data source used in the survey. It just needs to contain fields that you want passed along.
You can learn more about Survey123 URL parameters here: Survey123 Tricks of the Trade: Web form URL parameters.
If the values you want to push into a survey may contain special characters, you will need to URL encode them. That can easily be done using Arcade in the list’s Advanced Formatting section.
var survey_link = 'https://survey123.arcgis.com/share/073a65481062442cb655db657559e386?'
var params = {
"field:_state": $datapoint.STATE_NAME,
"field:county_name": $datapoint.NAME,
"field:county_fips_code": $datapoint.COUNTY_FIPS
}
var link = survey_link + UrlEncode(params)
return {
textColor: '',
backgroundColor: '',
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
attributes: {
link: link
}
}
Survey with prepopulated fields coming from a dashboard list.
I really like this set-up when I have a survey that will have frequent updates to choice lists. Especially when I am handing it over to someone who is new to Survey123 and/or it is a survey with choice filters or pulldata functions based around that choice list.
This set-up leverages the search appearance, so no changes to the Survey XLS or republishing is required. Although that does mean that it will not work with offline workflows.
With our choices now coming from a feature layer, we can set up an additional survey to add to or update the choice list. Not only is submitting a survey easier for a non-GIS user than republishing the survey or appending data to a linked CSV, but it also allows us to enforce certain requirements. For example, if your survey uses cascading selects, new choices will need to have a choice filter column filled out with values that match options from a previous question.
Survey interaction diagram
How I set up the survey depends on what capabilities I need.
A simple, one question survey is all you need. The resulting data layer can then be used in your “real” survey via the search appearance method.
Choice survey with a single question
A simple dashboard with the embed widget and a list creates a nice survey management center for administrators. Adding URL parameters to the lists gives them the option to provide event-specific links for the feedback survey and dashboard to their users.
Dashboard to add new choices and create custom survey links
We can modify our existing basic choice list survey to include additional information that can then be autopopulated in the survey based on the selected event.
Choices survey with additional details to pull in
The choice survey data layer will be used in our feedback survey’s choice list and used to populate additional fields using the pulldata @layer method.
Dashboard to add new choices and create custom survey links that pull in choice details
Let’s say that my event feedback survey is intended to get feedback from participants. I want to capture the role each participant had in the event to ensure that no roles feel like they were not adequately supported during the event. Due to the wide variety of events that my organization puts on, there is quite a variety of potential roles. This is where cascading selects come in. I want the role choice list to filter based on the selected event.
Survey with cascading choices
This is where my choice survey gets a little more complex. I like to leverage repeats to create my filtered choice lists. This ensures that the correct choice filter is added to each choice while allowing the user to only enter it once.
At the parent layer, my survey will capture the event name and any associated attributes I want to pull into my feedback survey based on the event name. Next, I will add a repeat with two fields:
Choices survey with a repeat to capture cascading choice options
I’ve also added a second embed widget to my survey management dashboard. This second widget uses the same embedded survey as the original embed widget, but this time in edit mode. This allows users to make changes to the details that are automatically pulled into the feedback survey as well as make changes to the associated role choices.
Dashboard with surveys to add and update choice options, as well as, custom survey and dashboard links.
Dynamic Choice Lists using Search Appearance
Survey123 Tricks of the Trade: Choice Filters
Survey123 Tricks of the Trade: Embedding a survey in an ArcGIS Dashboard
Survey123 Tricks of the Trade: pulldata("@layer")
Survey123 Tricks of the Trade: Web form URL parameters
There are a bunch of detailed sample surveys available to you in Survey123 Connect. The ones that go over concepts mentioned in this post or used in my attached samples are:
Sample surveys in Survey123 Connect
Dashboards That Pop: URL Parameters
Happy Dashboarding!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.