Welcome to the LimeSurvey Community Forum

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

Large "spreadsheet" survey with many numeric arrays and many expressions

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 3 months ago #90175 by DenisChenu
For calculation, best is tu use Équation and not default answers, no ?

Denis

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.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 3 months ago #90180 by Mazi
Why?

Using my approach you should be able to easily put several formulas into one question instead of setting up a new question for each one.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 3 months ago #90185 by DenisChenu
Ah yes,

You're right. Think the best is:
Use Équation for question where équation are OK
Use javascript other time (for example for TOTAL sub value (readonly), or user enter sur total ifhe don't know subvalue.

Denis

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.
The topic has been locked.
  • Fred01
  • Fred01's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
11 years 3 months ago #90196 by Fred01
For now I'm trying single numerics and/or equations for all questions.

1) For each of the calculations we need a relevance expression to make sure all the inputs are there. So a numeric lets you have a unique relevance for each calculation vs. a multi-numeric where you have one for all the subquestions

2) There is some metadata about the calculations that we are storing in question attributes and so, again, using numerics lets us set the attributes for each one separately, rather than a multinumeric where the subquestions share most of the same attributes.

3) We want to save all the calculations to the DB and I prefer having the formula themselves saved in the question record for posterity (rather than in javascript).

4) We are going to be moving everything around with javascript anyway, so the presentation structure of multinumerics and arrays isn't necessary and can even be a hindrance.

5) There WILL be a lot of questions to create, but there is a lot of repetition in the structure and I'm trying to us Excel as a kind of "question factory" to build the codes, relevance expressions, and equations, etc.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 3 months ago #90199 by Mazi

Fred wrote: 5) There WILL be a lot of questions to create, but there is a lot of repetition in the structure and I'm trying to us Excel as a kind of "question factory" to build the codes, relevance expressions, and equations, etc.

For an easy way to add lots of questions into Limesurvey, have a look at the Excel import: docs.limesurvey.org/Excel+Survey+Structu...tions+for+LimeSurvey

If you are relying on certain question IDs when using JavaScript to customize the question alignment, doing several imports of the Excel survey might cause problems though.
In this case, try using Em placholderhers within the JS code, assuming that the code is put at the question source text or the like (template.js does not get parsed by EM.

This way, you can let EM add the QID dynamically:
var question = {questioncode.qid};

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose