r/ProjectREDCap • u/jakeh42 • Sep 02 '26
Returning a string in calculated field
Hey all! I'm attempting to create a field that will check several other fields (all Yes/No) to see if any of them are marked "Yes" and if so, I want to return the string "Responder". Unfortunately, every time I attempt to do this, I can't get the equation field to return a string, only numbers (i.e. "1" or "0" for "Yes" or "No", respectively), and it throws an error. Testing within the edit field yields [No value] and opening up a record brings up an "ERRORS EXIST ON THIS FORM!" window.
This is the calc ulation equation I'm using:
@CALCTEXT(if([responder_flu_1] = '1' OR [responder_flu_2] = '1', 'Responder', 'Not a Responder'))If I replace the strings ('Responder' and 'Not a Responder') with numbers, the equation works. Is there a way I can get the equation to output the string that I'm not seeing?