Conditions Help

5 years 5 days ago #100768 by wireframemedia
wireframemedia created the topic: Conditions Help
I need some assistance with conditions. We have a Q3 which is a numbers array (using checkboxes), multi-select. We have three columns and column 3 is mutually exclusive via JS.

The issue is with conditions. We have three questions later in the survey which are based on this question. We want those three questions hidden if the user selects column 3 for all rows.

I tried some simple conditions such as Row # <>1 in all the column three questions but then it stopped showing it when ANY of them were checked in column three. Not equal to doesn't seem to work well. I tried again with all columns 1,2 (not 3) <> 0 with AND statements and again it failed.

Based on the fact that this is multi-select, it becomes impossible to figure out all combinations and would add thousands of conditions.

Is there a way through JavaScript or a hidden equation question to hide those three subsequent questions if the user selects all in the NONE column?

See image below for what Q3 looks like.

Any help you can offer would be greatly appreciated.

Please Log in or Create an account to join the conversation.

5 years 5 days ago #100802 by tpartner
tpartner replied the topic: Conditions Help
There may be a prettier way of doing this but...

- Question code for array = array1
- X-scale codes for array = x1, x2, x3
- Y-scale codes for array = y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11

Then the relevance equation for the 3 conditional questions could be:
{sum(array1_y1_x3.NAOK, array1_y2_x3.NAOK, array1_y3_x3.NAOK, array1_y4_x3.NAOK, array1_y5_x3.NAOK, array1_y6_x3.NAOK, array1_y7_x3.NAOK, array1_y8_x3.NAOK, array1_y9_x3.NAOK, array1_y10_x3.NAOK, array1_y11_x3.NAOK) != 11}

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

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!