Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Can I recode to missing value?

I have two questions.
Q1: Have you had contact with X?
Q2: [branching q2 is displayed if q1 == 1]. Why did you contact X
        Multiple Select question with list

The data for Q2 populates as '0' when Q1 receives an answer of 2. I get why and I know it can be prevented if I move Q2 onto another page.

I also know that I can use some PERL like so:
if (GETVALUE('Q1') == 1) {
     SETVALUE('Q2',999) ;

I want to know if instead of recoding q2 to 999 I can somehow just get rid of any data?
asked Apr 7 by Nwiggin Bronze (1,250 points)
Instead of calling SETVALUE with 999, you could call it with an empty string.

SETVALUE('Q2_1', '');

The validity of this command may vary depending on what server you are hosting your survey on.  Be sure to test this before sharing your survey with users.

1 Answer

0 votes
I resolved the issue.  In the scenario above Q2 is a multiple select variable so in reality I'm doing Q2_1, Q2_2, etc.

Multiple select variables can only allow single-digit, numeric responses.  If I tried to do a 999 or '' I got a 276 error.  The solution is to set the value to (in this case) 9.

So long as the value is not a 0 or 1 then I can easily flag it as missing values in the analytics software.
answered Apr 8 by Nwiggin Bronze (1,250 points)