Hiding a question based on the interviewer user name

The Challenge

Recently I received an interesting request. The challenge was to show/hide a few questions of the survey depending on which interviewer was conducting the interview. For example, if the interviewer user “Any” was conducting the interview Q4 should not be shown. In general this would mean to access the interviewer user name from script.

The Solution

The solution is actually pretty simple and consists of using the “SurveyorName” keyword in the script. So, to show Q4 only for the interviewer user “Any”:

  1. Add an entrance rule to Q4:

SurveyorName == “Andy”

This entrance rule will make sure to only show Q4 if the current interviewer user conducting the interview is “Andy”:

You can use the “SurveyorName” in all scripts and logic rules of SurveyToGo, it is not limited to entrance rules. You can also use the “SurveyorExtRefID” to access the external reference num on the user properties:

Visit us at: http://www.dooblo.net