function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karleen MendozaKarleen Mendoza 

Syntax error in workflow process builder

Hi all! I'm creating a workflow in Process Builder and need to create criteria where the formula evaluates to true.. however I'm getting a syntax error and I have no idea what I am doing wrong!
AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) = [Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c ) = ‘Work Comp’)

)

||

AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) = [Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c ) = ‘Property’)

 
Best Answer chosen by Karleen Mendoza
Raj VakatiRaj Vakati
OR(
AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) =[Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c ) = 'Work Comp'
)
,

AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) = [Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c)  = 'Property'
)
)

 

All Answers

Raj VakatiRaj Vakati
Use this one
 
AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) = [Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c ) = 'Work Comp')

)

||

AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) = [Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c ) = 'Property')
)

 
Karleen MendozaKarleen Mendoza
It's saying there's an extra ")" doesn't tell me where..
Raj VakatiRaj Vakati
OR(
AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) =[Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c ) = 'Work Comp'
)
,

AND(
DATEVALUE([Policy__c].Scheduler_Date_Time_Renewal__c ) = [Policy__c].Expiration_Date__c - 121,
TEXT([Policy__c].Policy_Stage__c ) = 'In Force', TEXT([Policy__c].Policy_Type__c)  = 'Property'
)
)

 
This was selected as the best answer
Karleen MendozaKarleen Mendoza
That saved! Thanks!!