Welcome to the LimeSurvey Community Forum

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

How to simplify data entry in a question that is an array of numbers

  • hafmili
  • hafmili's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 day 19 hours ago #270680 by hafmili
I am an educator. I am using Limesurvey Cloud Version 6.14.2, to survey students about a new course that we offered in the last semester. I go over each major topic, and for each topic, I ask the students about the subtopics that were supposed to be covered: 1) what was their competency level at the start of the course (from 0 to 5), 2) competency level at end of course (from 0 to 5), 3) how much class time the instructor spent covering the topic (0 for NONE, 5 for too much time), and 4) level of complexity of material presented (from too basic (0) to too advanced (5)).

Naturally, I am using an Array of numbers. The Y axis corresponds to the various subtopics, and the X axis corresponds to the four aspects mentioned above (competency level at beginning of course, competency level at end of course, class time spent on the topic, and level of complexity).

What I want to do: if the instructor did NOT cover the subtopic, they can just enter 0 for the corresponding X-question (third one), and not bother with the other.

I tried the following "Question validation equation", and it did not do the trick

(!is_empty(G02Q01_YQ001_XQ003.NAOK) and (intval(G02Q01_YQ001_XQ003.NAOK)==0) and is_empty(G02Q01_YQ001_XQ001.NAOK) and is_empty(G02Q01_YQ001_XQ002.NAOK) and is_empty(G02Q01_YQ001_XQ004.NAOK)) or ((intval(G02Q01_YQ001_XQ003) > 0) and !is_empty(G02Q01_YQ001_XQ001.NAOK) and !is_empty(G02Q01_YQ001_XQ002.NAOK) and !is_empty(G02Q01_YQ001_XQ004.NAOK))

In the following screen shot, I want to the first and second row to pass, and the third one to fail.

Ideally, I would like this to work. Alternatively, I could set all the initial array values to 0, that way students can skip a topic if it has not been covered. The posts of this forum provided an equation to enter in the "equation question". Where is that specified? I browsed the various question facets (general settings, logic, display, etc.) and I could not find it.
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 11 hours ago #270681 by tpartner
Joffm will probably be more clever, but maybe something like this (line-breaks inserted for clarity)

Code:
(G02Q01_YQ001_XQ003.NAOK == 0 
AND 
count(that.G02Q01_YQ001.NAOK) == 1)
 
OR
 
(G02Q01_YQ001_XQ003.NAOK > 0 
AND 
count(that.G02Q01_YQ001.NAOK) == 4)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 6 hours ago #270682 by Joffm
Hi,

Joffm will probably be more clever

Oh, no, I'm not.

But some remarks.
In your screenshot the question is mandatory.
You know, this way you can't set it to "mandatory"; some cells are not answered.
But the validation Tony showed forces that each row id answered.

Two more proposals to make it a bit less confusing for the respondent.

1. First ask which sub themes were covered, then ask only about these. Use array filter.
Now the question can be mandatory, because column 3 can not be NONE.


2. And a second way:
Use an array(text) with inserted drop-downs.
This way you can display better scales than to have to explain them in the header.
 
Make columns 1, 2 and 4 depended on column 3.
If column 3 is NONE the other columns are set to empty and disabled.
But again this question can't be mandatory. But you know that column 3 has to be answered.
So it is suficient to validate that column3 is answered for all sub themes, like count(self.sq_X003)==3 (number of sub themes)
 


By the way

The posts of this forum provided an equation to enter in the "equation question". Where is that specified? I browsed the various question facets (general settings, logic, display, etc.) and I could not find it.

An "equation question" is a question of type "equation".
But in this case I am sure that there was the mention of a "question validation equation".
This you find in the settings "Logic"

Now it's up to you to decide what to do.

If there are further questions, please provide a lss export of this aprt of the survey.

And I wonder why you ignored and removed the questions that appeared when you started this thread.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose