randomize selected 1-2 in multi qusetions

Plus d'informations
il y a 2 mois 2 semaines #183056 par zn0610
Hi Team

I have a complicated logic related with MA selected and randomize setup 1-2 option for next 2 Array questions was asked.

Details:

There is 1 MA question with 10 options and respond can selected 1-10 options.

If selected option size>1, then in next question will randomize selected 2 options and shown for next 2 Array questions(like Q2a and Q2b).Like:
Q2aWhy do you selected in Q1(brand1).
Q2bWhy do you selected in Q1(brand2).

But if there is one option like option7(brand 7) was selected, must ask option7 in next SA question and randomize selected one option to asked from others.
If not including option7(brand 7), randomize selected 2 options and asked in next 2 Array questions.

Not sure if clear, thanks

Jerry

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 2 mois 2 semaines #183061 par Joffm
Hi, not very clear.
As far as I understand:
There is a multiple question with 7 items, The respondent may select 0 to 7 items.
There are 2 question groups about 2 items.

Now there are three scenarios:
1. Resp, selects 2 or more -> select randomly 2 out of the selected items
2. Resp, selects 1 item -> select this one and randomly 1 out of the not selected items
3. Resp, selects 0 item -> select randomly 2 out of all items

Correct?

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 2 semaines - il y a 2 mois 2 semaines #183070 par Joffm
If I understood,
here is a working example.
It uses only LS internal functions (like "rand", "strlen", "substr", "str_replace" and "join"), no javascript.
I used letters to identify the brands; later you can use this in relevance equations like "b1=="F".

More than one item selected:


Only one item selected:


No item selected:


Fichier attaché :

Nom du fichier : limesurvey...4-09.lss
Taille du ficher :31 ko


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Dernière édition: il y a 2 mois 2 semaines par Joffm.
Les utilisateur(s) suivant ont remercié: DenisChenu

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 2 semaines #183141 par zn0610
Hi Joffm

Sorry for late responds.

Thanks a lot for your help, that's very helpful.It's correct.

Just one thing, there is another condition:
If selected option7(like brand7), must show brand7 first.
It's very important brand and priority to show.

Logic:
Q3 is Multi questions(number is 1-7).
IF BRAND SELECTED IN Q3 IS Brand7 THEN ASSIGN THE Brand7 AND ANOTHER RANDOMISED BRAND.
IF Brand7 IS NOT SELECTED Q25 (NOT AWARE OF Brand7) THEN ALLOCATE THEM TWO RANDOMISED BRANDS.
RESPONDENT TO BE SHOWN ONE BRAND AT A TIME to below questions.
Q26a and Q26b(if Q3.size>1)
Q26a. please selected statements for randomize shown brand1
Q26b. please selected statements for randomize shown brand2

Thanks

Jerry

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 mois 2 semaines #183146 par Joffm
Hi,
then you just extend the example.

Now you have to distinguish between:
1. 1 brand selected -> this brand (Brand 7 or not) + 1 random brand
2. 2 and more
  1. Brand 7 was selected -> Brand 7 + 1 random brand
  2. Brand 7 was not selected -> 2 random brand
3. No brand selected: -> 2 random brands

All except the blue scenario are already covered.
In the green scenarios (which just select 2 random brands) you have to add a relevance of "Brand 7 not selected" which is obvious in 3.

Good luck
Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!