Can i show a random answer of a previous question in the text of other question?

Plus d'informations
il y a 3 mois 1 jour #181751 par FreshLemonUser
Hi again, thats me... Jejeje

Can i show a random answer of a previous question in the text of other question?

i have this:

Q6Q2. When thinking about your experience with each of the following companies, what are the chances that you will recommend each to a colleague on a scale of 0-10? (Array, 5 subquestions)

Then i Have :

Q6Q2B. In the previous question, you gave a rating of {Q6Q2_SQ001.shown} and  to this company you gave a rating of: [ i have to put in here a ramdomly option with answers of 0-3 or 7-10 OF Q6Q2 different from Q6Q2_SQ001 ] can you explain this?

How can i do this: i have to put in here a ramdomly option with answers of 0-3 or 7-10 OF Q6Q2 different from Q6Q2_SQ001.

I´ve tried this, but i know that i have to many errors and i have to do more things:


if((Q6Q2_SQ002.NAOK <= 0 or Q6Q2_SQ002.NAOK >= 7) or
(Q6Q2_SQ003.NAOK <= 0 or Q6Q2_SQ003.NAOK >= 7) or
(Q6Q2_SQ004.NAOK <= 0 or Q6Q2_SQ004.NAOK >= 7),
'I have show any of this Q6Q2')

Please point me on the rigth direction.


i´ll attached some images and a LSG file.


Thanks in advanced.
Pièces jointes :

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

LimeSurvey Partners
Plus d'informations
il y a 3 mois 1 jour #181757 par Joffm
Hi,
yes you can.

My solution is to use two hidden equations.
At first I changed te answer option codes to numerical codes from 0-10.

In the first equation "eq1" I join

{join(if((Q6Q2_SQ002.NAOK<4 OR Q6Q2_SQ002.NAOK>6),"2",""),if((Q6Q2_SQ003.NAOK<4 OR Q6Q2_SQ003.NAOK>6),"3",""),if((Q6Q2_SQ004.NAOK<4 OR Q6Q2_SQ004.NAOK>6),"4",""),if((Q6Q2_SQ005.NAOK<4 OR Q6Q2_SQ005.NAOK>6),"5",""))}

So, if the subquestion matches the requirement a letter is joined.
Example. If companies A and C are rated >7 the string "eq1" is "24"

In the second equation "eq2" I randomly select one of these characters
{substr(eq1,rand(0,strlen(eq1)-1),1)}

Now you have one specific character and are able to display:

In the previous question, you gave a rating of {Q6Q2_SQ001.shown} to company "XXX"

and a rating of {if(eq2==2,Q6Q2_SQ002.NAOK,if(eq2==3,Q6Q2_SQ003.NAOK,if(eq2==4,Q6Q2_SQ004.NAOK,Q6Q2_SQ005.NAOK)))} to company "{if(eq2==2,Q6Q2_SQ002.question,if(eq2==3,Q6Q2_SQ003.question,if(eq2==4,Q6Q2_SQ004.question,Q6Q2_SQ005.question)))}"

Fichier attaché :

Nom du fichier : limesurvey...7817.lss
Taille du ficher :23 ko


You have to add the check if none of the companies are in the "good" range.

Best regards
Joffm





Volunteers are not paid.
Not because they are worthless, but because they are priceless
Pièces jointes :
Les utilisateur(s) suivant ont remercié: FreshLemonUser

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

Plus d'informations
il y a 3 mois 1 jour - il y a 3 mois 1 jour #181765 par FreshLemonUser
Dear Joffm

Thanks for your help, that was exactly what i needed, you are my hero.

i hope this can be used for the community

Best regards.

A Fresh Lemon User
Dernière édition: il y a 3 mois 1 jour par FreshLemonUser.

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!