# Random block by select question

Dear All,

Q1 single select question. There are 6 answers as below:

1. Promo1-Promo2-Promo3
2. Promo1-Promo3-Promo2
3. Promo2-Promo1-Promo3
4. Promo2-Promo3-Promo1
5. Promo3-Promo1-Promo2
6. Promo3-Promo2-Promo1

Another question I have set in 3 blocks.

Block 1: From Q2x1 to Q8x1
Block 2: From Q2x2 to Q8x2
Block 3: From Q2x3 to Q8x3

I want to randomize these block depend on Q1. For example

If Q1=1 we will ask Block 1 => Block 2 => Block 3.
If Q1=2 we will ask Block 1 => Block 3 => Block 2.
If Q1=3 we will ask Block 2 => Block 1 => Block 3.
........

How can i do that?

Setup / define your 3 blocks by clicking on the "Randomize" button and then select "Blocks" followed by "Add Set".

Select the Anchor Question 1 and 2 for each block as follows ...

Block 1: From Q2x1 to Q8x1
Block 2: From Q2x2 to Q8x2
Block 3: From Q2x3 to Q8x3

Create a parent list and call it BlockList and define it as such ...

1 Block 1
2 Block 2
3 Block 3

Now create a constructed list which uses the parent list BlockList and call it BlockConList ...
```Begin Unverified Perl

if (VALUE("Q1")==1)
{
}

elsif (VALUE("Q1")==2)
{
}

elsif (VALUE("Q1")==3)
{
}

elsif (VALUE("Q1")==4)
{
}

elsif (VALUE("Q1")==5)
{
}

else
{