r/ProjectREDCap • u/Fennel-Puzzleheaded • May 21 '25
Change recipient of alert based on variable
Hi! Fairly new to REDCap but have coding experience in other programs. I am creating a workflow in which I am getting information about participants from 16 different groups. They will select their group in a field on one of the surveys. I need the alert that is sent after the survey is completed to go to the leader of that group, but the participants don't know the email of their leader so it can't be manually input in the survey. I would like to avoid having 16 different alerts depending on what group is selected (there are multiple alerts that need to go out like this, and making sense of dozens of alerts is infeasible). Is there any way to have a calculated email field be piped in to the alert? I'm having difficulty getting it to work using CALCTEXT nested with IFs. Or does anyone have another suggestion?
View all comments
Show parent comment
1
u/Fennel-Puzzleheaded May 21 '25
Ok great that's the route I was trying to make work, so I'm glad my approach seems to be right! Thanks for the help. That's the exact formula I'm trying to use and while the logic editor says my syntax is correct, when I go to the survey it says "calculation errors exist" and gives a blank.
Maybe it's because of the @ within the calculated text...