[Back]  [Print Page]
Using URL Parameters in a Survey

You can send data into a survey through the URL and use the data in your survey. This method of inserting data into a survey can be used to integrate an outside data source with Vista. Data from the outside data source can be passed into a Vista survey and included as part of the survey data analysis.

How data is passed into a Vista survey

For example, Vista gives you a link to your survey that looks something like this:


However, you can change the link to include data you want to pass in by appending a data item name and value of the format &Name=Value. For example:


The extra parameters "Version=A" and "CustomerID=12345" contain the custom data you want to pass into your questionnaire.

Pulling URL Parameters into a Hidden Question

To pull URL parameters from the survey URL, you can add a Hidden Question to your survey.  The Hidden Question will not be displayed to the user but rather will get its data from a URL parameter.  A hidden question is treated just like any other question, which means you will see its data in your results analysis and you can use the answer in piping, Ask if Logic (Advanced Ask if Logic) and formulas.  Here is how you add a Hidden Question.

Insert a Multiple Choice or Text Box question into your questionnaire. In either case, the question text must be:


Where ParameterName is the name of the field you inserted in the URL. For example if you insert a Multiple Choice question with the question text:


and the answer options are A, B, C or D, this question will be populated with the answer "A" in the example URL above.

To populate a free-form text question, use a similar technique but make the question text:


The example URL above will cause this question to be populated with the value "12345".