Dynamic modification of variables to be selected

40 views
Skip to first unread message

Carlo Ferrari

unread,
Jul 30, 2025, 5:36:07 PMJul 30
to Redcap Open
Hi everyone,

In RedCap I have 2 variables: 
   - variable [height] (radio-button single answer) has two possibilities: "tall" or "short"
   - variable [color] (drop-down menu) has four possibilities: "black", "white", "red" and "green" 

If I choose "tall" from variable [height], the variable [color] must display only "black" and "white" options. Viceversa, if "short" is selected from variable [height], the variable [color] will display only "red" and "green" options.

Is it possible?

Amit Tandon

unread,
Aug 1, 2025, 2:17:10 AMAug 1
to Redcap Open
Yes. You can do it. Provided these on separate forms. The height in Form A and the Colour question in Form B

Use the action tab @IF in the[ color] question

@IF([height] = 'tall', @HIDECHOICE='red,green',  @HIDECHOICE='black,white').

You can add another level of sophistication for the height not selected case

Luke Stevens

unread,
Aug 1, 2025, 3:26:04 AMAug 1
to Amit Tandon, Redcap Open

If they’re on the same form, just use two variables, one for the short colours and another for the tall:

 

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 Amit Tandon
Sent: Friday, 1 August 2025 16:17
To: Redcap Open <redca...@googlegroups.com>
Subject: [REDCap Open] Re: Dynamic modification of variables to be selected

 

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 visit https://groups.google.com/d/msgid/redcap_open/fd51fc5d-0e54-4cbe-a20e-e8069734ac0fn%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.

Message has been deleted

Luke Stevens

unread,
Aug 11, 2025, 6:52:54 PMAug 11
to Amit Tandon, Redcap Open

Hello Amit,

 

Your three steps sound reasonable, but Q3 can only take effect after a save at step Q2. To be clear, you have to save the Q2 value, then afterwards open the form containing Q3 and save it for the Q3 value to be available in a report or dashboard: @SETVALUE takes effect on page load, then you need to save the page for the value to be persisted in the database.

 

If you want to cut out that extra third step then you can use an external module like (my) Copy Data on Save to copy the Q2 value to Q3 when Q2 is saved.

 

HTH,

Luke

 

From: Amit Tandon <att...@gmail.com>
Sent: Monday, 11 August 2025 16:43
To: Luke Stevens <luke.s...@mcri.edu.au>
Cc: Redcap Open <redca...@googlegroups.com>
Subject: Re: [REDCap Open] Re: Dynamic modification of variables to be selected

 

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

 

Dear Luke

 

How do you think I could do that? Are you suggesting using display questions based on the response? 

 

I have also been unable to find a solution for the display weight category: from 0 to 4. In my application, I am asking for the baby's weight. The weights are classified into 5 categories. Now I want to store those categories as a dropdown. This is meant for display as well as use in Project Dashboard graphs. I have done the following

Q1. Enter Baby weight (text field)

Q2. Using calculation, identify the weight Category

Q3. A drop-down (single choice) of all the categories. Now I want to populate this variable from Q2. I have used @SETVALown remains balkUE='[Q2Variable]'. But the drop-down remains blank. 

 

How can I achieve this


============
regds
amit

"We who cut mere  stones must always be envisioning cathedrals"

"The difference between fiction and reality? Fiction has to make sense."

 

Amit Tandon

unread,
Aug 21, 2025, 9:14:54 PMAug 21
to Luke Stevens, Redcap Open
Very helpful. 
============
regds
amit

"We who cut mere  stones must always be envisioning cathedrals"
"The difference between fiction and reality? Fiction has to make sense."

Reply all
Reply to author
Forward
0 new messages