Jan 14, 2021 08:42 PM
Could someone please help troubleshoot this?
I’m trying to calculate an expiration date based on the service provided. I believe I shouldn’t really be using “or” here, but included this just to help illustrate what I’m trying to do. Each IF statement works individually but not when I try to string them together.
I have about 10 of these conditions that I’d like to check for.
IF({Service}=‘Heartguard Plus’,(DATEADD({Date Expires},1,“Month”)))
or
IF({Service}=‘Annual Exam’,(DATEADD({Date Expires},1,“Year”)))
or
IF({Service}=‘3 year Rabies’,(DATEADD({Date Expires},3,“Year”)))
Thanks for your help!
Jan 15, 2021 05:24 AM
I recommend you use a SWITCH
instead.
SWITCH({Service},
'Heartguard Plus', DATEADD({Date Expires},1,"Month"),
'Annual Exam', DATEADD({Date Expires},1,"Year"),
'3 year Rabies', DATEADD({Date Expires},3,"Year")
)
Jan 15, 2021 05:50 AM
Oh that looks much easier! I’ll give that a shot, thanks!