Welcome to the LimeSurvey Community Forum

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

Create a question based on selected items in a control array (number; Checkbox)

  • percyherrera
  • percyherrera's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 days 8 hours ago #269894 by percyherrera
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 6.12.3
Own server or LimeSurvey hosting: LimeSurvey Cloud 
Survey theme/template: Inherit [fruity_twentythree]
==================
Hello friends, I need your help. I have an array-type control that has 4 columns and 4 rows with the checkbox option enabled. I need to create another array-type question, but only with the rows that have been activated in the 4th column, called "RRSS," as shown in the image. I tried doing this by placing the name of the question (p1) in the "Array filter" option, but I haven't achieved what I'm looking for. For example: If in question "p1" and in the "RRSS" column, I check the rows "Business 1" and "Business 4," I would like question "p2" to only display these two items as rows. Can you help me with any recommendations? Thank you!

 
 

File Attachment:

File Name: limesurvey...7535.lss
File Size:42 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 days 6 hours ago - 2 days 6 hours ago #269896 by Joffm
Hi,
on this case you have to use "subquestion relevance" in p2.




And to know which value you have to enter:
Activate your small sample, enter some data and have a look at the response table,
 

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 days 6 hours ago by Joffm.
The following user(s) said Thank You: percyherrera

Please Log in to join the conversation.

  • percyherrera
  • percyherrera's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 day 21 hours ago #269905 by percyherrera
Thank you very much, my friend @Joffm. I implemented your recommendation and got the result I was looking for. Thank you!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
15 hours 24 minutes ago #269920 by Joffm
HI,

I saw that you entered as "relevance equation" something like this.
p1_1_SQ4
This is not correct.
1. This is no equation. You recognize an equation by the "equal" sign or another operator.
2. I wrote "Have a look at the response table!
As you also see in the screenshot below, in an array(numbers) a selected checkbox is stored as "1", an empty checkbox as "".
This is different from a multiple question where there also are checkboxes, but a selected checkbox is stored as "Y"
So the equation has to be p1_1_SQ4==1
And this logical term can be TRUE (if the checkbox is checked, and the value is 1) or FALSE (if it is not checked)

Unfortunately you are lucky. The programming language (php) stores boolean variables (TRUE, FALSE) as tiny integers.
FALSE -> 0
TRUE -> 1
Therefore ts works in this special case.

But you should get used to always write full equations.

Joffm
 

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

Please Log in to join the conversation.

  • percyherrera
  • percyherrera's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 hours 57 minutes ago #269921 by percyherrera
Thank you for the clarification, and what luck I have. 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose