Piping the response not selected into another form

74 views
Skip to first unread message

Shreenidhi Sharma

unread,
Sep 22, 2023, 8:32:37 AM9/22/23
to redcap open
Hi there, 

I have two forms (form A and form B) and I was wondering if there was an easy way to pipe the answers not selected from form A into form B. For an example if form A question 1, is a yes or no and the participant selects "yes" then the response that gets piped into form B would be "no". 

Thanks in advance for your help!! 

Danilo Micali

unread,
Sep 22, 2023, 6:44:30 PM9/22/23
to redcap open
Hi there,

Considering your Yes/No example, there is an easy solution using action tags in the form-B variable you would like to have the answered piped to. [var1] would be in form A and [var2] would be in form B. I am assuming Yes=1 and No=0.

@IF([var1] = '1', @DEFAULT = '0', @DEFAULT = '1')

If you would like to account for the possibility that [var1] could be empty (recommended), use the following:

@IF([var1]='', @DEFAULT='',@IF([var1]='1', @DEFAULT='0', @DEFAULT = '1'))

This would get trickier to set if your variables have more than 2 possible answers. If that's the case, I would consider reframing the question of [var2] to accept the same answered provided in [var1] and a simple piping would work.

Hope this helps!

Luke Stevens

unread,
Sep 23, 2023, 11:04:28 PM9/23/23
to Shreenidhi Sharma, redcap open

Hello Shreenidhi,

 

If your questions on Form A are yes/no, then you could set up a counterpart for each on Form B with the values/labels reversed, then set the value using @SETVALUE and pipe from there.

 

E.g.

 

Form A

               var_x 1=Yes; 0=No

               var_y 1=Yes; 0=No

               var_z 1=Yes; 0=No

 

Form B

               var_x_neg 0=Yes; 1=No @SETVALUE=’[var_x:value]’

               var_y_neg 0=Yes; 1=No @SETVALUE=’[var_y:value]’

               var_z_neg 0=Yes; 1=No @SETVALUE=’[var_z:value]’

              

Not selected on Form A:

var_x: [var_x_neg]

var_y: [var_y_neg]

var_z: [var_z_neg]

 

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 Shreenidhi Sharma
Sent: Friday, September 22, 2023 10:33 PM
To: redcap open <redca...@googlegroups.com>
Subject: [EXTERNAL]Piping the response not selected into another form

 

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

 

Hi there, 

 

I have two forms (form A and form B) and I was wondering if there was an easy way to pipe the answers not selected from form A into form B. For an example if form A question 1, is a yes or no and the participant selects "yes" then the response that gets piped into form B would be "no". 

 

Thanks in advance for your help!! 

 

--
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/9c900e88-5358-482d-958d-c4ad7381c2d4n%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.

Shreenidhi Sharma

unread,
Sep 25, 2023, 9:56:20 AM9/25/23
to redcap open
Thank you! I will give this a try... I appreciate your help. 

Shreenidhi Sharma

unread,
Sep 25, 2023, 9:57:00 AM9/25/23
to redcap open
Hi Luke, 

Thank you for this tip, I will try this to see if it works. I appreciate your help. 

Shreenidhi 

Reply all
Reply to author
Forward
0 new messages