Can a relevant statement reference enumerator input?

Suspect this will be a "no" but I'll ask anyway.

I was juggling with how to randomise the order of a Select One question, so as to reduce any inherent ordering bias.

A prior question in the survey requires a unique to each respondent ticket number be input.

If it was possible to reference that prior collected ticket number I could have load a re-ordered Select One question by assigning a ticket range within the relevant cell i.e. Select One (v1) loads between ticket no. 1-249, Select One (v2) loads between ticket no. 250-499 etc.

Not random per se but good enough for my purposes.

It's not beautiful and may quickly become awkward depending on how many orderings you want and how many choices are in your list. But the following seems to do what you are asking.

survey

+-------------------+-------------+--------------------+-----------------------------------------------------------------------------+
|       type        |    name     |       label        |                                choice_filter                                |
+-------------------+-------------+--------------------+-----------------------------------------------------------------------------+
| integer           | participant | Participant number |                                                                             |
| select_one mylist | choice      | Select one         | listorder = if(${participant}<=249, '1', if(${participant}<=499, '2', '3')) |
+-------------------+-------------+--------------------+-----------------------------------------------------------------------------+

choices

+-----------+------+-------+-----------+
| list name | name | label | listorder |
+-----------+------+-------+-----------+
| mylist    | a    | a     |         1 |
| mylist    | b    | b     |         1 |
| mylist    | c    | c     |         1 |
| mylist    | c    | c     |         2 |
| mylist    | a    | a     |         2 |
| mylist    | b    | b     |         2 |
| mylist    | b    | b     |         3 |
| mylist    | a    | a     |         3 |
| mylist    | c    | c     |         3 |
+-----------+------+-------+-----------+

2 Likes

Hi @danbjoseph

Elegance, like beauty, is in the eyes of the beholder and your solution looks beautiful to me!

I've only got a six choice answer to randomise so it's a fairly containable amount of work.

Many thanks for offering up this very neat solution.

2 Likes