Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Bug? Multiple numerical input w/ sub-question equation validation + array filter

Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87424

Hi all,

I'm trying to set up a survey where we have 3 questions:
Q1 - Multiple choice (mandatory)
Q2 - Multiple numerical input (mandatory)
Q3 - Multiple numerical input (mandatory)

Q2 and Q3 are array-filtering from Q1.

Each of Q3's values must be greater than Q2's. So, in its sub-question validation, I have put "this > that.Q2"

The survey does not let me proceed unless in Q1, I have checked ALL the options. Meaning that I think the logic behind the sub-question validation checks ALL of the input fields, even if they don't appear because they have been array-filtered. The "Mandatory" check of course does not include those.

Can anybody shed some light on this? I've really struggling to figure this out for the last couple of days. Also, the tip display logic doesn't appear to be working consistently for this either, although I am admittedly a novice with these new features.

I have tested this in 1.92+ and 2.00+

Thank you
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87429

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Take a look at the logic file. You will see that that.q2 will expand to all subquestions, so the equation is not valid. You need to explicitly test each subquestion via whole question validation not subq validation.
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87430

Yes, I noticed that, but still I thought it would be the best method to use.

The manual states:
The main difference between this feature and the Sub-question validation equations (em_validation_sq option) is that for this feature, if the question (or question parts) fail validation, then an error message could be shown. For the sub-question validation, each text entry cell (e.g. in array, but also applies to single entry question types) will be styled so that the background color is pink.

How would I test each subquestion via whole question validation? I though subquestion validation was for subquestions, and whole question validation was for the sum of the parts?
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87432

I tried it with whole-question validation as well, but it appears to have the same problem.

It should also be noted that I am proceeding in a group-by-group fashion.
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87433

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
The this variable expands to the name of the current subquestion when you use subquestion validaton. If you use whole question validation, that single equation is tested each time a value changes. Try the demo surveys at /docs/demosurveys/*.lss
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87434

TMSWhite wrote:
The this variable expands to the name of the current subquestion when you use subquestion validaton. If you use whole question validation, that single equation is tested each time a value changes. Try the demo surveys at /docs/demosurveys/*.lss

Thanks TMSWhite, I have checked out the demos. And actually, what you're saying that it should be doing (the 'this' variable expanding to the name of the current subquestion when you use subquestion validation) is what I want it to be doing: Every time something is typed in to Q3's fields, I want it to check against Q2's fields (so Q3_1 checks against Q2_1... Q3_2 checks against Q2_2... and so on).

The problem is it isn't responding as one would expect. I believe it's trying to validate fields that don't appear because of the array filter, making it impossible to proceed.
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87435

TMSWhite wrote:
The this variable expands to the name of the current subquestion when you use subquestion validaton. If you use whole question validation, that single equation is tested each time a value changes. Try the demo surveys at /docs/demosurveys/*.lss

For example, for the Question Validation Equation:
(this / 3) == floor(this/3)

for the Question Validation Tip:
{if(!((this / 3) == floor(this/3)),'Bad','Good')}

And I'm creating an array filter from Q1. Very strange behaviour. It never actually displays 'Bad'. It just always displays 'Good' in various colours. And I can't proceed unless all of the checkboxes in Q1 are checked.

If you try a quick implementation of this locally I think you'll see what I mean. I believe it's a problem with array filters equation validation.
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
Last Edit: 1 year 10 months ago by spacejanitor.
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87436

Also just tried the "Demo of em_validation_sq"

There is some strange behaviour on all of the numerical inputs. It's highlighting the fields in red when they ARE valid, and otherwise in white if they are INvalid...

However, the later question types (long free text, short free text) seem to work fine.
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
Last Edit: 1 year 10 months ago by spacejanitor.
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87454

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Does the validation work correctly and only the red highlighting is irritating? In this case, this might be template related. Which template do you use (I recommend using the shipped default template for such tests)?

If you think you have found a bug and you can easily reproduce it at the latest Limesurvey 2 version, please file a bug report at our bugtracker and attach your survey for testing.

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Bug? Multiple numerical input w/ sub-question equation validation + array filter 1 year 10 months ago #87456

Both the highlighting and validation appear to be incorrect at least for those question types. I will upload my survey at the bug tracker now for your reference.

Thank you
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.136 seconds
Donation Image