Hi I am using REDCap for data collection. My question is how to auto populate variable from one from to another form in REDCap. For example, BMI from enrollment to baseline visit.
2 Answers
Exactly how the piping will work will depend on your project design and setup. From your question it sounds as though you're running a longitudinal study. In a longitudinal study, an instrument exists within an event. You need to prepend the field variable name with the event name.
Say you had two events: Enrollment and Baseline, and in Enrollment you had two instruments: Consent and Medical History Questionnaire. In the Baseline event, you might have the Medical History Questionnaire again, plus event-specific forms, like a mood scale.
In REDCap, fields are globally unique among all instruments, and so usually you need to simply indicate the field using the [var] syntax. In a longitudinal study however, a single instrument can exist in multiple events, and to correctly identify the field, you need to first indicate the event name.
To pipe the BMI field (assuming it's labelled [bmi]
) from the Enrollment event, you would use the piping code [enrollment][bmi]
.
If your instance has version 8.4 or above, you should have access to smart variables. These allow you to traverse the events in a dynamic way using variables like [previous-event]
, [first-event]
, etc. You can use this to perform advanced branching logic to display some text on a form only if that form is not in the first event of a longitudinal study: [event-name] != [first-event-name]

- 690
- 4
- 12
It's called piping in REDCap. you simply put the variable inside brackets and use it as a parameter on any forms. This link has the piping example in it. http://www.ecu.edu/cs-itcs/redcap/upload/REDCap-Advanced-User-Guide.pdf

- 5,000
- 3
- 34
- 62

- 1
- 2
-
We're trying to build a body of valuable content, not only links. Can you improve your answer by giving some sample code please? – Peter Ivan Dec 27 '17 at 17:09