Welcome to the LimeSurvey Community Forum

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

Hidden Array Numbers question to Calculate a result based on previous question.

  • Maverick87Shaka
  • Maverick87Shaka's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 7 months ago #141570 by Maverick87Shaka
Hi to All,
Actually I have this scenario:
I have an Array Numbers question with the checkbox layout enabled, and the Question validation equation ( called Q3 as QuestionID ).
This question have 30 Y-Scale subquestions, and only 2 option for X-Scale, OptionA and OptionB.
This style works fine from users experience but have a lot of work to be done manually to have a good result.
The goal now is to being able to automatic calculate the result. The result that I need is only a numerical value for each Y-Scale subquestion.
So, I would like to create new Array numbers Question (hidden) with only one X-Scale, and "auto-fill" this hidden question with a numeric value based on previous question filled by user (QuestionID: Q3)
Where the value is:
  • 1if the user check the OptionB column
  • 2if the user leave the row blank ( no optionA or B selected )
  • 3if the user check the OptionA column

These hidden question is only an idea, and I also appreciate any other suggestion to simplify the process.
I know that I can use the EquationType question to use buildin function to get other value, but these mean to create 30 hidden Equation Question to have my result.

Thanks
The topic has been locked.
  • Maverick87Shaka
  • Maverick87Shaka's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 7 months ago #141601 by Maverick87Shaka
I forgot to mention the Version, I'm on Version 2.50+ Build 160620.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #141607 by tpartner
Well, I suppose you could do this with JavaScript but I would go with the 30 equation questions. That will result in the same number of columns in the data and copying a question only takes a few seconds.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose