Piping is a powerful, and relatively simple, tool in REDCap that allows users to insert data previously recorded into instruments, emails, and other locations.
With piping you can reference data entered in previous fields in your REDCap project. This can be useful in many situations, and this guide will cover two of them here.
First, though, how do you pipe data in REDCap? By putting the variable name for the data you want to pipe in square brackets like these [variable_name]. As long as you have spelled the variable name correctly REDCap will fill in the bracketed term with what was recorded for that variable.
One reason to use piping is to ask a follow up question to a participant. Say you asked how many aspirins participants took a day in a previous survey, using the variable aspirin_count and in a later survey you want to know if that number is still the same. Instead of asking them to remember what they answered, or looking through the responses yourself, you could pipe the data into a new field as seen below:
This way when a user has answered 3 previously they will see the question with their previous data as seen below:
If you are using Events to schedule different occurrences of the same data collection instrument you will need to add something to your piping to make sure the data from the right event is getting shown. You can do this by adding the unique event name which is found in the Define My Events page in square brackets prior to the variable name with no spaces in between the sets of brackets.
The name is on the right of the table where you add events. In the image below, if you wanted to refer to the data from the variable aspirin_count in the Intake Event, you would put:
and if you wanted to refer to the data from the Month 1 Event you would put: