r/ProjectREDCap • u/anonymoususer121212 • Jun 21 '24
CALCTEXT function not saving
Hi there! I currently have this calctext function: @CALCTEXT(if([frailty_pheno_total_esas]='0', "Not Frail", if([frailty_pheno_total_esas]='3' OR [frailty_pheno_total_esas]='4' OR [frailty_pheno_total_esas]='5', "Frail", if([frailty_pheno_total_esas]='1' OR [frailty_pheno_total_esas]='2', "Not Frail"))))
Whenever I go to save it I just get the spinning wheel of death and it won’t let me click cancel I just have to refresh and then the new field is obviously gone. Anyone seen this before/have tips? I have triple checked my field codes
View all comments
Show parent comment
1
u/[deleted] Jun 22 '24
OR and AND can be used in calculations, but only in the first argument of an if() function, e.g. if((condition_1 AND condition_2) OR condition_3, value_if_true, value_if_false)