Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Where to put the assignment operator

Where to put the assignment operator 2 years 4 months ago #107463

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • Offline
  • Gold Lime
  • Posts: 241
  • Thank you received: 53
  • Karma: 13
In the documentation about EM it is mentioned that the assignment operator (=) can be used to set the value of objects that do not accept a default value. Put where should I put this statement? I could put {a=1} on for instance a (hidden?) text display, but I noticed this does not work correctly (the value is only shown after a refresh). What is the best place to put a assignment?

Thanks
Frans
The administrator has disabled public write access.

Where to put the assignment operator 2 years 4 months ago #107487

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9305
  • Thank you received: 1330
  • Karma: 386
Hi,

In an hidden Equation question. You can set to in a relevance equation, but it's really not the best solution. The real solution is
In general, if you want to assign a value to a variable, you sould create an Equation question type, and use an expression to set its value.
source : manual.limesurvey.org/Expression_Manager...t_Operator_.28.3D.29
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: fransmarcelissen
Moderators: ITEd
Time to create page: 0.214 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form