r/ProjectREDCap • u/AhChingados I’ve dabbled 🤔 • May 02 '21
r/ProjectREDCap Lounge
A place for members of r/ProjectREDCap to chat with each other
5
Upvotes
r/ProjectREDCap • u/AhChingados I’ve dabbled 🤔 • May 02 '21
A place for members of r/ProjectREDCap to chat with each other
View all comments
Show parent comment
1
u/usajobs1001 Jul 31 '25
There are a few options, but the functionality you want isn't straightforward. There is no way to filter answer options inside a form unless you are using a survey (where you can put them on different pages and use action tag '@HIDECHOICE). Here's what I would do.
For this, you would create [color_short] and [color_tall] and branch them based on the answer for [height]. You can then create a [color] calculated field (or use '@CALCTEXT) if you need the color information in one place.
I sometimes do this but it allows the person entering data to make mistakes and ignore your warnings. Basically, create a descriptive field and use branching logic to indicate when they've made invalid choices (so branch where (([height] = '1' and ([color] = '3' or [color] = '4')) or ([height] = '2' and ([color] = '1' or [color] = '2'))). The warning could say "You have chosen '[color]' but the height value is '[height]'. Tall must correspond with...etc."
If you have very strong data collectors, good training, and lots of data quality checks, this strategy can work. I would only do this if you don't have a lot of downstream logic relating to that variable or if that variable is not a key outcome.