Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

how to use EM in EM?

  • iscar
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
9 years 9 months ago #109806 by iscar
how to use EM in EM? was created by iscar
text display question,
Code:
{if(q1.value==1,'your answer is q1.shown','your answer value is q1.value'}
the q1.shown and q1.value should be run as EM but not. what's the problem?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago - 9 years 9 months ago #109809 by DenisChenu
Replied by DenisChenu on topic how to use EM in EM?
Hi,

q1.value : the assesment value. Assesment is set for this survey ?

With NAOK (with Question code)
Code:
{ifq1.NAOK=="1",'your answer is '+q1.shown,'your answer value is '+q1.NAOK}
or
Code:
{ifq1.NAOK=="1",join('your answer is ',q1.shown),join('your answer value is ',q1.NAOK)}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 9 years 9 months ago by DenisChenu. Reason: Fake whitespace
The topic has been locked.
  • iscar
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
9 years 9 months ago #109813 by iscar
Replied by iscar on topic how to use EM in EM?
yes, can i use
Code:
{if(q1.NAOK=="1",'your answer is {q1.shown}','your answer value is {q1.NAOK}')}
?
The topic has been locked.
More
9 years 9 months ago - 9 years 9 months ago #109814 by Ben_V
Replied by Ben_V on topic how to use EM in EM?
Definitively NO:
you cannot embed {some other expression} inside your {main expression}

As Denis said, the correct syntax in something very closed to:
Code:
{if(q1.NAOK=="1",'your answer is '+ q1.shown,'your answer value is '+q1.NAOK)}

Note: due probably to strange copy and paste, the beiginning of your example is corrupted and source of issues...
Wrong: {if( (fake white space)
Correct: {if (

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 9 years 9 months ago by Ben_V.
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose