Select to view content in your preferred language

Dashboards That Pop: Survey Management Dashboard

115
0
Wednesday
JenniferAcunto
Esri Regular Contributor
3 0 115

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.  

Edit a Survey Record 

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.A list action filtering an embed widget only when selected.

 

Prepopulate Fields 

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.Survey with prepopulated fields coming from a dashboard list.

 

Update Choice Lists 

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 diagramSurvey interaction diagram

How I set up the survey depends on what capabilities I need.  

Basic Choice List 

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 questionChoice 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 linksDashboard to add new choices and create custom survey links

 

 

Choice List with Pull Data 

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 inChoices 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 detailsDashboard to add new choices and create custom survey links that pull in choice details

 

Cascading Selects 

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 choicesSurvey 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: 

  • Event Name (Choice Filter Field): This value is automatically populated with the event name above using survey calculations. 
  • Role: This will be one of the choices that will be displayed for this event. 

  

Choices survey with a repeat to capture cascading choice optionsChoices 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.Dashboard with surveys to add and update choice options, as well as, custom survey and dashboard links.

 

Resources 

Survey123 Blogs 

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 

 

Survey123 Sample Surveys 

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: 

  • Choice Filters and Cascading Selects 
  • Dynamic Choice Lists Using Search Appearance 
  • Geocode and Reverse Geocode 
  • Query a Feature Layer 

 

Sample surveys in Survey123 ConnectSample surveys in Survey123 Connect

 

Dashboards 

Dashboards That Pop: Embeds

Dashboards That Pop: URL Parameters 

Dashboard URL Parameters

  

Happy Dashboarding! 

Dashboards That Pop Series 

Contributors
About the Author
I'm a Technical Consultant that focuses on app configuration with a little Geospatial Strategy and Governance thrown in.