I am getting a parse error at the last character of my formula, but no error is showing in the code. I was wonderinfg if someone could take a look and see what I am missing. I have tried to re create the formula and the same thing happens. Any insight you have would be greatly appreciatated. Here is a screen shot and the code itself.
if contains([Name2],"Accountability") then "Accountability" else if contains ([Name2],"Leadership and Culture") then "Leadership and Culture" else if contains ([Name2],"Policies and Procedures") then "Policies and Procedures" else if contains ([Name2],"Track, Monitor, Report and Respond to Data") then "Track, Monitor, Report and Respond to Data" else if contains ([Name2], "Patient and Family/Caregiver Education") then "Patient and Family/Caregiver Education" else if contains ([Name2],"Pain Management") then "Pain Management" else if contains ([Name2],"Prescriber and Staff Education and Competency") then "Prescriber and Staff Education and Competency" else if contains ([Name2],"Technical Support") then "Technical Support" else if contains ([Name2],"Tapering") then "Tapering" else if contains ([Name2],"OUD & MAT") then "OUD & MAT" else if contains([Name2],"Community Collaboration") then "Community Collaboration" else "" endif
Hi @aberthiaume
@Luke_C is 100% correct on the formula issue, but I want to address something else with your request.
This formula will be an enormous pain to maintain on a regular basis if anything changes or someone else needs to take over this workflow. I would instead recommend using a reference file and the Find Replace tool to match these values and append them to your output.
Take a look at the workflow attached. I think you'll find this method is a lot easier to manage when working with multiple references as opposed to writing giant IF THEN CONTAINS statements.
Cheers!
Phil