REDCap, Calculated Text — Apply Same Conditional Function to Several Fields at Once (e.g. print all labels for fields that the user picked “true” on)

  Kiến thức lập trình

I have a long survey in REDCap and we’re wanting to generate a summary of all items the participant endorsed. They’re all true/false.

So lets say the fields are named question1, question2,…, question20.

I want to make a new field in REDCap that pulls out the field labels from all questions marked true. This is of course done with a Text field that has CalcText.

But in terms of the logic I write into the equation for that, is there a code efficient way to say “print the Field Labels for all questions that the participant marked “True” on”? Or am I stuck writing out 20 separate if then statements?

LEAVE A COMMENT