How to filter response options in subsequent checkbox lists

179 views
Skip to first unread message

Olivia Manders

unread,
Oct 3, 2023, 10:46:37 AM10/3/23
to redcap open
Hi All,

I have a filtering question.  I have been told there is no way to do this in REDCap, but it seems that other survey tools are able to do this.

We have a set of 5 questions that have a checkbox list of 14 options. What I would like to be able to do is if in Question 1, the respondent checks the boxes for options 1, 4, 5, 6 that only these options appear as checkbox items in the subsequent questions.

example:
1. Which do you eat regularly?
a. apples
b. bananas
c. carrots
d. yogurt
e. french toast
etc.

2. Which do you eat for breakfast?
b. bananas
d. yogurt
e. french toast

I've tried piping, action tags, and a host of other work-arounds to no avail. I found in a previous posting to try using a CSV file, and that didn't work either (strong possibility of user error here).

Does anyone else know how to accomplish this?

Many thanks in advance!

Olivia

Luke Stevens

unread,
Oct 3, 2023, 6:35:28 PM10/3/23
to Olivia Manders, redcap open

Hello Olivia,

 

You can do it by separating the choices for the subsequent options into individual checkbox fields and using appropriate branching logic on each. Like this:

 

https://redcap.mcri.edu.au/surveys/?s=787LCARP387PMFEP&foodsreg___b=1&foodsreg___d=1&foodsreg___e=1

 

 

HTH,

Luke

Luke Stevens
Research Data Systems Manager
Clinical Epidemiology & Biostatistics Unit (CEBU)
Murdoch Children's Research Institute
The Royal Children's Hospital, 50 Flemington Road
Parkville, Victoria 3052 Australia
T   +61 3 9345 6552
E   luke.s...@mcri.edu.au
W  mcri.edu.au

 

 

 

From: redca...@googlegroups.com <redca...@googlegroups.com> On Behalf Of Olivia Manders
Sent: Wednesday, October 4, 2023 1:47 AM
To: redcap open <redca...@googlegroups.com>
Subject: [EXTERNAL]How to filter response options in subsequent checkbox lists

 

CAUTION:  External Email. Please be cautious with attachments and clicking links

 

--
You received this message because you are subscribed to the Google Groups "redcap open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redcap_open/edc5a65b-87e0-4c47-babd-599c87fb71b3n%40googlegroups.com.



This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.

David Edwards

unread,
Oct 3, 2023, 7:01:38 PM10/3/23
to Luke Stevens, Olivia Manders, redcap open
I reckon Luke's way may be the way to do it. I just tried experimenting with the 2nd question having the action tag:

@HIDECHOICE='[q_1:unchecked:value]'                   (where [q_1] is the name I've given your 1st question)

... but I don't think @HIDECHOICE accepts fields inside quotes, and no matter how I tried working around it about it (e.g. using an intermediary @CALCTEXT field with  concat()), I just couldn't get it to work. I tried a lot of ways but no cigar.

It's a damn shame because if you put [q_1:unchecked:value] in a descriptive field it shows up just fine - it just doesn't like it in that @HIDECHOICE action tag, which is infuriating as it would be ideal for this.
Sorry - I tried!
David.


From: redca...@googlegroups.com <redca...@googlegroups.com> on behalf of Luke Stevens <luke.s...@mcri.edu.au>
Sent: 03 October 2023 22:35
To: Olivia Manders <olivia....@gmail.com>; redcap open <redca...@googlegroups.com>
Subject: RE: [EXTERNAL]How to filter response options in subsequent checkbox lists
 
Reply all
Reply to author
Forward
0 new messages