Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Miscellaneous questions about EM

Miscellaneous questions about EM 1 Jahr 4 Monate her #95864

  • rejeanp
  • rejeanps Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
Hello to all,
EM is great... but if find it very difficult to do simple things. If someone could answer the following question, I would be able to progress in my learning of EM. Loking through the manual is very painful for me since I do not master the specific language of LimeSurvey. Thank you in advance.

My surveys are bilingual (english and french). When I create a variable (ex. sum(qa,qb,qc)) with the equation question type, I discovered that I have to copy and paste the same formula in both english and french section. Why is it so?

What is the proper way to create a variable (ex. sum(qa,qb,qc)) that will sum values from questions collected in a previous group?

In a typical survey, I create a group for questions and the a group for results. In the results group I create variables (equation, hidden) to save in the database. Then I create a summary (report) with text and get on variables created earlier. What is the proper way to refer to these variables?

Here is an example that does not seem to work. Showing depression_level value works but not the depression_text

depression_level = sum(question_3.NAOK, question_5.NAOK, question_10.NAOK, question_13.NAOK, question_16.NAOK, question_17.NAOK, question_21.NAOK, question_24.NAOK, question_26.NAOK, question_31.NAOK, question_34.NAOK, question_37.NAOK, question_38.NAOK, question_42.NAOK)

depression_text = if(depression_level < 10, "Normal", if(depression_level < 14, "Mild", if(depression_level < 21, "Moderate", if(depression_level < 28, "Severe", "Extremely Severe"))))
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Miscellaneous questions about EM 1 Jahr 4 Monate her #95865

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1098
  • Dank erhalten: 247
  • Karma: 78
Hello,

If not already made you may have a look at the "/docs" folder included in all LS original package; It contains an unvaluable set of demo surveys showing the most useful EM features;

BTW for your "depression_level" question, the correct syntax will be very closed to:
{if(depression_level < 10,'Normal', if(depression_level < 14, 'Mild', if(depression_level < 21, 'Moderate', if(depression_level < 28, 'Severe', 'Extremely Severe'))}
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Letzte Änderung: 1 Jahr 4 Monate her von Ben_V.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Miscellaneous questions about EM 1 Jahr 4 Monate her #95867

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1098
  • Dank erhalten: 247
  • Karma: 78
EDIT: Missing ")"
{if(depression_level < 10,'Normal', if(depression_level < 14, 'Mild', if(depression_level < 21, 'Moderate', if(depression_level < 28, 'Severe', 'Extremely Severe'))))}
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Miscellaneous questions about EM 1 Jahr 4 Monate her #95868

  • rejeanp
  • rejeanps Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
Thanks,
I did not know that " and ' were not equivalent.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Miscellaneous questions about EM 1 Jahr 4 Monate her #95875

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1098
  • Dank erhalten: 247
  • Karma: 78
I did not know that " and ' were not equivalent.

No, it's the same and I suppose both could be used in this kind of EM expression; I thought your issue was related to the lack of curly braces wrapping the expression...

Is it working now? if not check carefully question ID codes and "Survey logic file" icon:
quality_assurance.png
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.226 Sekunden
Donation Image