Have an idea?

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

Actively skip (and re-visit) question block in randomization

Hi,

We are planning to conduct a physical research event in which people try out and evaluate four different products.

Each product will be evaluated based on a block of questions and the goal is that ideally every respondent will evaluate all  products in a random order.

There will be multiple respondents on-site and we would like to avoid any kind of queueing and allow social distancing.

Is it possible to implement some kind of button which can be clicked in case the assigned product is already in use to that the respondent can go to the next product and will be sent back to the one that has been skipped at later stage?

Thanks in advance!

Matt
asked Jan 6 by Matt
Tricky, but perhaps not off the table.  What I would probably do is create the two normal lists: a predefined one with the products and a constructed one with randomization.  Then I'd create a select question that uses the constructed list with skips that go to the start of the four code blocks.  Each of the code blocks could set a pass-in field to 1 when they start, so that at the end of each block you could have two skips: one that skips them to the end of the product section if all four pass-in fields are marked, another that just skips them back to the original select question.  You'd want to use some custom code so that the select question looks like the respondent is just being told what product to look at next, but I could help write that.

Where this gets hairy is that Lighthouse Studio by default clears out responses when a respondent goes back and changes an answer.  So the answers to product 3 would be wiped out when the respondent goes back to the select question and gets sent to product 1.  We could potentially disable this data cleaning functionality entirely to stop this.

Does that make sense?  Does this seem like a viable route for your needs?
Hi Zachary,
Thank you very much for the quick reply. Partly this sounds like a solution that I have been trying out over the last hours.

Pre-defined list: A list of the four products
Constructed list: A sublist of the four products based on:

if(ANSWERED("QBlock1")== 0)

{

 ADD("PredefinedList",1);

}

if(ANSWERED("QBlock2")== 0)

{

 ADD("PredefinedList",2);

}

etc.

And then the actual questions:

- Selection question based on the constructed list
- Post skip to the question block that has been selected
- Then the four blocks with a post skip back to the selection question

Selection question:
Right now I would give an instruction like: Please select the product that is on the top of the list and click next. If that product is already in use please click on another one.



Skipping back is probably the problem in this setup. I have also tried it with another selection question after the four blocks. It works in the first loop but then strange things seem to happen.

What do you mean when you say "disable this data cleaning functionality"? How can that be disabled? Would that maybe also solve my problem?

And how would you use the pass-in fields exactly?

Again thanks for your support!

Matt
Glad to hear we've had similar thoughts.  One concern that you may have with your approach is that constructed lists are only ever defined once per respondent (with exceptions for respondents backing up to an earlier question or if the first question using the list is within a loop).  So your select question will show each product every time.  My thinking was to use CSS to just hide the products they have already seen.

I'm imagining four pass-in fields named something like "seenProduct1," "seenProduct2," "seenProduct3," and "seenProduct4."  At the beginning of each of the four product sections, you could set the pass-in field using Sawtooth Script like this:

[% SetValue(seenProduct3, 1) %]


Then when you get to the end of each product's block, you would skip the respondent to the post-products section with skip logic like this:

seenProduct1 = 1 And seenProduct2 = 1 And seenProduct3 = 1 And seenProduct4 = 1


The data cleaning functionality can be disabled, but only by modifying a .pl file that comes with the installation of the software.  If you can tell me what version of SSI Web / Lighthouse Studio you are running, I can help you there.
I did not know that the constructed list will not be refreshed. That explains it all. Could you please help me and write an example of how to hide the already completed options via CSS?

And again regarding the data cleaning functionality: I am running version 9.8.1. Just to confirm: This problem would only occur if a respondent clicks on the back button in this section, right? Maybe we can also de-activate the button.

1 Answer

0 votes
You can put this code into your select question to hide the products that have already been seen:

[% Begin Unverified Perl
# Parameters
my $clist = 'list2';
my $passInFieldBaseName = 'seenProduct';

# Run
my $css = '<style>';
my $len = LISTLENGTH($clist);
for (my $i = 1; $i <= $len; $i++) {
    my $item = LISTVALUE($clist, $i);
    if (GETVALUE($passInFieldBaseName . $item) == 1) {
        $css .= '#' . QUESTIONNAME() . '_div .clickable:nth-child(' . $i . ') { display: none; }';
    }
}
$css .= '</style>';
return $css;
End Unverified %]


Line 3 should be updated with the name of your constructed list of products.  Line 4 should be updated with the base name used in your pass-in fields.

The data cleaning problem would not apply only when clicking the back button, because our skips that go back to the select question are also treated like backing up.  To disable this functionality, you would need to go into your Lighthouse Studio installation folders.  The default install location is:

C:\Program Files\Sawtooth Software\Lighthouse Studio 9.8.1


From within your install location, there's a file located at:

...\Server\cgi-bin\authlib9_8_1.pl


You can make a backup of the file if you want (alternatively, a reinstall should restore the original file).  Then in the file do a search for this:

sub _bqu { my ($__bjj, $__bjk) = @_;


and replace that with this:

sub _bqu { return; my ($__bjj, $__bjk) = @_;
answered Jan 6 by Zachary Platinum Sawtooth Software, Inc. (171,950 points)
Thanks again. Your code with the CSS works very well.
Are there any possible side effects when I change this parameter?
Modifying Perl files is not supported by Sawtooth Software, so I cannot promise that other consequences will not occur.  That said, I know other users have implemented equivalent changes in their .pl files in the past, though I'm not sure for which versions of SSI Web / Lighthouse Studio.

I would recommend thoroughly testing your survey after making this change.  As a hunch, I would focus on constructed lists that are defined based on question responses.  For example, you answer Q1, move onto Q2 that uses AIC(Q1), change your responses to Q1, and return to Q2.  If you have randomized blocks or looping, those can both involve constructed lists too.

If you have a lot of questions before/after the products part of the survey, another option that might relieve some testing concern would be to split your study file into multiple studies that link to each other.  This way, the special .pl change would not affect the questions outside of this part of the survey.
...