[Skip Global Navigation]

SPSS Tech Tips

SPSS Direct Home

Using sample variables in mrInterview ™ surveys

This is a complimentary tip available to SPSS Direct subscribers.

Question

How can I use IOM scripting to pull sample variables into my survey and set them? I would like to verify respondents’ current employers, and update my sample file if the respondents’ employers have changed since they last took the survey.

Answer

You can use IOM scripting to see the current value of a field in the sample file and display that value in the interview to a respondent.

To begin, create a question using new text inserts:

The code in the first IOM script sets the values of the “Name” and “Employer” inserts shown in the EmployerCheck question’s display text.

If a respondent answers “No” for the EmployerCheck question, he will be asked the NewEmployer question (“Who is your new employer?”).

You can use another IOM script to record his response to the NewEmployer question back to the sample file.

If you re-create this example in mrInterview, your final survey will look like this: