If you are using User Data Fields to store data about each of your Alchemer users, you can leverage this data within surveys using the User Data question.
As an example, let's say that we've set up training course instructors as users in our Alchemer account. Within their User Data Fields we store information about the course each user teaches. We can leverage this data to create a survey question.
Setup
1. To set up a User Data question, select User Data from the Question Type dropdown and enter the question text you would like to ask.
2. Under Answer Options start by selecting the User Data Field you wish to use as answer options. In our example, we want to display all the courses that our users teach so we'll select Course.
Our other User Data fields will be available, as will the Email field.
3. Next, there are two options that you may wish to enable. You can enable one or both or none of the 'Restrict' options.
- Restrict users to only view responses that are related to their User Data - This option will automatically filter Individual Responses, Reports, and Exports accessed by the user to only show data related to the course they teach.
Example Scenario:
- You created a Course User Data Field.
- For user Jon Smith on your Alchemer account, you provided a value of Math as their Course (since Jon Smith is the Math Instructor).
- In your Course Evaluation survey, you created a User Data Question and selected the Course User Data Field as the source of the question's answer options.
- Jon Smith logs into Alchemer and creates a Standard Report to view the results of the above Course Evaluation survey.
- When Restrict users to only view responses that are related to their User Data is not selected, Jon Smith can see the results of the evaluation for all courses.
- When Restrict users to only view responses that are related to their User Data is selected, Jon Smith only sees the results for the Math course (Math is the value associated with the Course User Data Field for Jon)
- Restrict which values display in the list of answer options - This option will provide you with the ability to show a subset of your list of answer options for certain user data values using a condition.
Example Scenario:
- You created two User Data Fields: Course and Department
- You created a Course Evaluation survey but you are only sending it to the Sales Department.
- In your Course Evaluation survey, you created a User Data Question and selected the Course User Data Field as the source of the question's answer options.
- Your Course User Data Field is a comprehensive list of courses across all departments and you need to only show the courses that are taught by the Sales Department.
- Select to Restrict which values display in the list of answer options and create the following condition:
- Now, when respondents see the Course question, only courses for the Sales Department will be populated.
4. Last, under Format you can choose how you wish to have your answer options displayed to your respondents.
- Dropdown Menu (default)
- Radio Button List
- Hidden Value - (not visible to survey respondents) This option should be used with prepopulation via URL Variables. Learn more in the Prepopulation section of this tutorial.
Note: You may notice that the available Format options are all single-select questions/inputs. This is by design and allows for the discrete reporting on a per user basis. Multiple User Data questions based on the same User Data Field should not be included in the same survey.
5. Click Save Question when you are finished setting up your User Data Question.
When you are finished setting up your User Data question, you can test it out in your survey. You'll see that the answer list populates with all possible values (or a subset of possible values if you are using the option to Restrict which values display in the list of answer options).
Prepopulating Your User Data Question
In the above example we covered how to set up a question to display to your survey respondents using either a Dropdown Menu or Radio Button List layout. This allows respondents to select values from one of your User Data Fields.
If instead you wish to prepopulate a question you can do so by using URL Variables. When prepopulating you can use any of the available Formats, Radio Button List, Dropdown Menu, or Hidden Value. If you choose to use either Radio Button List or Dropdown Menu Format this will prepopulate the question but still display it to the respondent. If you choose to use the Hidden Value Format this will populate and remain hidden from your respondents.
Using URL Variables to Populate a User Data Question
You can use URL Variables to pass in the values of a User Data Question set up as a Radio Button List or Dropdown Menu question. This allows you to prepopulate the value of the User Data question.
1. Add a User Data question by selecting User Data from the Question Type dropdown. The question you would like to ask can just be an internal title like "course" for our example case.
2. Under Answer Options you'll select the User Data Field you wish to use as answer options. In our example, we want to match up the data being passed in via URL variable to our Course User Data Field.
3. Next there are two options that you might want to enable (learn more above):
- Restrict users to only view responses that are related to their User Data - This option will automatically filter Individual Responses, Reports, and Exports accessed by the user to only show data related to the course they teach.
- Restrict which values display in the list of answer options - This option will provide you with the ability to show a subset of your list of answer options for certain user data values.
4. Finally, under Format choose Radio Button List or Dropdown Menu.
5. Go to the Layout tab to set up your prepopulation. Below the Default Answer field click the link to Insert Merge Code. Select URL Variable from the Advanced section of the dropdown menu and click the + Insert button. Now, replace the xxx inside the quotes with the URL variable you will be passing in; in our case, this is course. Click Save Question.
6. (Optional) You can hide your prepopulated question from displaying if you wish to prevent respondents from changing their answers. To do so, place the following in the CSS Class Name field on the Layout tab: sg-hide.
This is an alternative to the Hidden Value set up below that you might choose if you wish to take advantage of how either the Radio Button List or Dropdown Menus report.
Learn more about reporting options for Radio Button in the Reporting Section of the Radio Button Tutorial.
Learn more about reporting options for Dropdown Menu in the Reporting Section of the Dropdown Menu Tutorial.
When you are finished setting up your User Data Hidden Value you're ready to test it out. To do so add the URL variable to your survey link and record a response.
Using URL Variables to Populate a Hidden Value User Data Question
You can use URL Variables to pass in the values of a User Data Question set up as a Hidden Value. This allows you to set the value of the User Data without needing to bother your respondent to answer the question.
In this case the question would still display to the respondent but since it is prepopulated it will save them some time as they will not need to answer the question. The respondent would of course be able to change the response to this question if they wish.
If you prefer to prepopulate and hide the question you can follow these steps and hide the question. Or set up your User Data question as a Hidden Value.
1. Add a User Data question by selecting User Data from the Question Type dropdown. The question you would like to ask can just be an internal title like "course" for our example case.
2. Under Answer Options you'll select the User Data Field you wish to use as answer options. In our example, we want to match up the data being passed in via URL variable to our Course User Data Field.
3. Next there are two options that you might want to enable (learn more above):
- Restrict users to only view responses that are related to their User Data - This option will automatically filter Individual Responses, Reports, and Exports accessed by the user to only show data related to the course they teach.
- Restrict which values display in the list of answer options - This option will provide you with the ability to show a subset of your list of answer options for certain user data values.
4. Under Format choose Hidden Value.
5. Go to the Layout tab to set up your your Hidden Value to capture your URL Variable. Below the Default Answer field click the link to Insert Merge Code. Select URL Variable from the Advanced section of the dropdown menu and click the + Insert button. Now, replace the xxx inside the quotes with the URL variable you will be passing in; in our case, this is course. Click Save Question.
When you are finished setting up your User Data Hidden Value you're ready to test it out. To do so add the URL variable to your survey link and record a response.
User Data Fields in Responses, Reports, & Exports
If you selected the option to Restrict users to only view responses that are related to their User Data when setting up your User Data question reports will be automatically filtered such that users will only see data that matches their user data values. Account administrators will always see all data, regardless of the values in their User Data Fields.
If the Restrict users to only view responses that are related to their User Data option was not selected the data will report like any other question.