We're moving to Flows and I need a bit of help on IF statements in Salesforce. I've tried a few variations but with the IF statement when creating a DATE formula but I keep getting “Syntax error. Missing ')'”
(IF(ISPICKVAL{!PASId.Program_SurveyAssessment__c.Due_Date_Anchored_To__c}, "Cohort Start Date", {!PASId.Enrollment__c.Cohorts__r.Start_Date__c}, IF(ISPICKVAL{!PASId.Program_SurveyAssessment__c.Due_Date_Anchored_To__c}, "Cohort End Date", {!PASId.Enrollment__c.Cohorts__r.End_Date__c}, IF(ISPICKVAL{!PASId.Program_SurveyAssessment__c.Due_Date_Anchored_To__c}, "Momentum End Date", {!PASId.Enrollment__c.Cohorts__r.Momentum_Module_End_Date__c}, null)))) + {!PASId.Program_SurveyAssessment__c.Days_from_Anchor_Date_to_Due_Date__c}
And when I try creating a Date formula using CASE, I get “Picklist fields are only supported in certain functions.” Can CASE and ISPICKVAL not go together?
CASE(ISPICKVAL(DATE({!PASId.Program_SurveyAssessment__c.Due_Date_Anchored_To__c})), "Cohort Start Date", {!PASId.Enrollment__c.Cohorts__r.Start_Date__c}, "Cohort End Date", {!PASId.Enrollment__c.Cohorts__r.End_Date__c}, "Momentum End Date", {!PASId.Enrollment__c.Cohorts__r.Momentum_Module_End_Date__c}, "") + {!PASId.Program_SurveyAssessment__c.Days_from_Anchor_Date_to_Due_Date__c}
What I'd ideally like the formula to return is the Date of whatever the Due Date Picklist is Anchored to and add "number of days from Anchor Date to Due Date". Any help would be appreciated!
ISPICKVAL
s.ISPICKVAL(field,value)