Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Can a user's name be carried forward in surveys?

Can a user's name be carried forward in surveys? il y a 1 an 9 mois #88732

  • camelchops
  • Portrait de camelchops
  • Hors ligne
  • Fresh Lemon
  • Messages : 3
  • Karma: 0
My survey starts off asking the user's name and their partner's name.

Can questions in the survey then refer to their partner by their name? In other words can I capture the first name field and carry it forward to future questions? e.g. 'What does Samantha think about drunk drivers?' I'm not good at coding by the way!
L'administrateur a désactivé l'accès en écriture pour le public.

Aw: Can a user's name be carried forward in surveys? il y a 1 an 9 mois #88736

  • tomscher
  • Portrait de tomscher
  • Hors ligne
  • Junior Lime
  • Messages : 22
  • Remerciements reçus 5
  • Karma: 2
The Expression Manager can help you.

Let's assume your question is named "partnername" (=question code). Then you can use the following code in your questions:

What does {partnername.shown} think about drunk drivers?

You will find addional examples here:
=> docs.limesurvey.org/Expression+Manager+HowTos

/edit: actually it should also work just with your question code. The .shown is not necessary, but a (bad?) habit of mine.
Dernière édition: il y a 1 an 9 mois par tomscher.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Aw: Can a user's name be carried forward in surveys? il y a 1 an 9 mois #88766

  • camelchops
  • Portrait de camelchops
  • Hors ligne
  • Fresh Lemon
  • Messages : 3
  • Karma: 0
Ah yes! The Expression Manager covers what I want to do - thanks!

Now I expect I'm being really dumb here, but when I try that, I get a red highlighted box around the question code that I entered in curly brackets, and when I hover over that it says 'undefined variable'. I expect it's something really basic I've missed ... :blush:
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Aw: Can a user's name be carried forward in surveys? il y a 1 an 9 mois #88767

  • tomscher
  • Portrait de tomscher
  • Hors ligne
  • Junior Lime
  • Messages : 22
  • Remerciements reçus 5
  • Karma: 2
You checked for typos? Embarassingly that's the most common cause in my case, so perhaps that's the reason for you as well? You have to use the exact name of the question given in the question code (check also for capital letters!). If you have problems using the EM, you could also use the somewhat older function of INSERTANS. That's the icon with the lemon in curly brackets....

Another line of approach (but actually this would imo lead to another error message): You inserted this question *after* the question of the partner's name? Otherwise it would not work, because the name has not yet been given.
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: camelchops

Re: Aw: Can a user's name be carried forward in surveys? il y a 1 an 9 mois #88776

  • camelchops
  • Portrait de camelchops
  • Hors ligne
  • Fresh Lemon
  • Messages : 3
  • Karma: 0
Yes, the lemon icon did it for me! Thanks again!
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Aw: Can a user's name be carried forward in surveys? il y a 1 an 9 mois #88896

  • Mazi
  • Portrait de Mazi
  • Hors ligne
  • LimeSurvey Team
  • Messages : 5325
  • Remerciements reçus 296
  • Karma: 249
camelchops, maybe you can help others by improving our manual. E. g. by posting an example here: docs.limesurvey.org/Expression+Manager+E...tions+for+LimeSurvey

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.132 secondes
Donation Image