Welcome to the LimeSurvey Community Forum

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

Addition question with conditionals

  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 2 months ago #227161 by torilee93
Addition question with conditionals was created by torilee93
Hello,

I have a question that adds up the total quantity of MLs based on what the user enters. At first the total was working but then I added conditionals into the questions and that broke the addition question. Is there a way to have an addition question for conditional questions?
To better explain, I have attached the question group.

Thanks for your time!

- Tori

Limesurvey  Version 5.3.8+220404

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #227162 by Joffm
Replied by Joffm on topic Addition question with conditionals
Please, never send lsq nor lsg export.
Only lss
​​​​​​Copy the survey, remove everything not related to your question and send this as lss.

But I am rather sure that you didn't use ".NAOK".
Without this the function "sum" will fail if one part is missing.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: torilee93

Please Log in to join the conversation.

  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 2 months ago #227164 by torilee93
Replied by torilee93 on topic Addition question with conditionals
Apologies! Did not know that wasn't allowed. You were correct, I was missing the ".NAOK"

Thank you for your help!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #227166 by holch
Replied by holch on topic Addition question with conditionals

Apologies! Did not know that wasn't allowed.


It is allowed to send LSG or LSQ files. But we don't like it, because it means more work for us. We are all volunteers and do this in our spare time.

You can still send .lsq and .lsg files, but if you want answers, it is better to send .lss files (with only the relevant parts, not all 20.000 questions in your little monster questionnaire).

;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: torilee93

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #227167 by Joffm
Replied by Joffm on topic Addition question with conditionals
And we do not like it, because lsq and lsg files are language sensitive.
You can't import such a file into a survey with a different base language.
So we have to create a survey guessing the base language of your export (or opening the export file in an editor to investigate there) and have to create a group, only to be able to import a lsq file.
Not to mention that this way we do not see any survey wide setting that may be important (e.g. "question by question" vs. "group by group")

As @holch, we all are volunteers and do this work in our spare time to help other users.
And therefore we hope (but also expect) that these users ease our life as much as possible.

Anyway, i am glad to hear that you solved your small problem.

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: torilee93

Please Log in to join the conversation.

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
3 years 2 months ago #227172 by tammo
Replied by tammo on topic Addition question with conditionals
Would it be worth a feature request that we can coerce importing the lsg/lsg into the survey, no matter what the base language is?

So (with an extra switch that says: import anyway) even if the base language of the question/group is swahili, you import it in your own base language?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl

Please Log in to join the conversation.

More
3 years 2 months ago #227174 by jelo
Replied by jelo on topic Addition question with conditionals

Would it be worth a feature request that we can coerce importing the lsg/lsg into the survey, no matter what the base language is?
 
Well, it depends on who you're asking.In the forum nearly everyone will support your idea. If you're a developer, you couldn't care less. Someone in forum will educate the user about the issues around lsg and lsq.

A export format which can contain themes and lss in one file would be useful too ;-)

When I look at the current job offers at LimeSurvey.we will see a lot of refactoring going on the next 12 months.
I see Yii-3 PHP Framework, React JS, Typescript, Bootstrap 5 and Redis.
The switch to Yii3 in the backend and to ReactJS in the frontend will mean a lot of work.
careers.limesurvey.org/jobs/Careers/3881...8/Front-End-Engineer
 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 2 months ago #227320 by torilee93
Replied by torilee93 on topic Addition question with conditionals
Thank you everyone for your input. I have an additional question. I have two questions a and b, that gathers the quantity the users enter (one for blood and another for colloids) and I want to make a question that calculates the total of a b. How can I do that? I tried Total = {(a.NAOK + b.NAOK)} but that doesn't seem to work.

Thanks!

- Tori

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #227321 by Joffm
Replied by Joffm on topic Addition question with conditionals
Oh, oh,

a and b are questions of type "text display".
That means "a.NAOK" is nothing, because there are nodata stored.

Ought to be "equation".

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: torilee93

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose