Random question

Hi all, I want to randomize question as follow:

[Programmer randomly select (1) if your village leader asked//(2) if your village party chief asked//(3) blank// would you be willing to contribute […]VND [Programmer: insert one of the amounts from Table C33a] to build or repair a [Programmer randomly select: new road/village house/streetlamp/primary school/park/] for your village.

TABLE C33a
Amount Code

100,000 1 750,000 6
200,000 2 900,000 7
300,000 3 1,000,000 8
400,000 4 1,500,000 9
500,000 5 2,000,000 10

Option Code

 1. Yes  0. No
 888. [DK] 999. [RA]

It means I want to randomly generate a question like: If your village leader asked would you be willing to contribute 200,000 VND to build or repair a new road for your village or Would you be willing to contribute 800,000 VND to build or repair village house for your village or if your village party chief asked would you be willing to contribute 300,000 VND to build or repair a streetlamp for your village,…

I would appreciate any suggestions you might have

Many thanks
Tan

Hello @nguyengiatan,

I have created a questionnaire to simulate your case:
This is the link to check it.

  1. The use of new Random() without a seed will result in a new random number every time the expression is evaluated. Thus your supervisor may see a totally different question than what the interviewer has seen, and you probably don’t want that.

  2. The solution is going to hit a roadblock once you need to have the questionnaire multilingual.

  3. from the perspective of an analyst working with the exported data, you’d probably want to know what specific question was asked.

imho all of these problems can be solved otherwise and without the use of [undocumented] Invoke().

Best, Sergiy

2 Likes