I am working on writing a formula inside process builder "Formula Evaluates to true" and it seems my logic is not working.
Suppose I have a following logic:
1 OR 2 OR 3 OR(4 AND 5)
Below is my formula which is I am writing which is not working:
OR( OR( 1, 2, 3), AND( ISNEW(), (this is 4) 5) )
Ideally combination of 4 AND 5 should comes with OR along 1,2,3. So I deally if an user puts value for fields 1 OR 2 OR 3 OR (4 and 5) process builder should run but right now process builder is only running when either 1,2,3 is filled and 5 is satisfying.
My real requirements:
Either Is_Medicare__pc OR Is_TriCare__pc OR Is_Medicaid__pc OR Person_s_Age__pc >= 65 is filled on account then process builder should update one field.
But right now process builder is running when either of
Is_Medicare__pc OR Is_TriCare__pc OR Is_Medicaid__pc is filled AND Person_s_Age__pc >= 65.
Below is my formula which I build:
OR( OR ( [Account].Is_Medicare__pc, [Account].Is_TriCare__pc, [Account].Is_Medicaid__pc ), AND ( ISNEW(), NOT(ISBLANK([Account].Person_s_Age__pc )), [Account].Person_s_Age__pc >= 65 ) )
Person_s_Age__pc is a formula field on contacts which is not supported by ISCHANGED() so i am using
EDIT : I am editing question based upon my recent work which I have done after giving a try to what @o-lexi has suggested. 1. Created one Date Formula field "65th BirthDate"(API NAME- X65th_BirthDate__c) Formula for this field is as below:
AND( MONTH( Date_of_Birth__pc ) = 2, DAY( Date_of_Birth__pc ) = 29, NOT( OR( MOD( YEAR( Date_of_Birth__pc ) + 65, 400 ) = 0, AND( MOD( YEAR( Date_of_Birth__pc ) + 65, 4 ) = 0, MOD( YEAR( Date_of_Birth__pc )+ 65, 100 ) != 0 ) ) ) ), DATE( YEAR( Date_of_Birth__pc ) + 65, 3, 1), DATE( YEAR( Date_of_Birth__pc ) + 65, MONTH( Date_of_Birth__pc ), DAY( Date_of_Birth__pc ) ) ) 2. Created one Formula field as "Over 65" 3. Created one time-dependent PB which sets "Over 65" to TRUE after 0 hrs from 65th BirthDate
- Modify my existing PB logic as OR( 1, 2, 3, Over_65__c )
Still not able to get what I was trying to achieve. If I put Date of birth on account as 15th May 1953 then upon saving 65th Birthday field is populating as 15th May 2018 but checkbox "Over 65"is not getting checked.Since checkbox is not getting checked my logic for updation of field value for "Insurance" to "Education Only" is also not set which I wrote in my another PB.Kindly help me on this issue.I am struggling alot on same from past 2 weeks and realaly running out of all ideas and knowledge. Any help will be greatly appreciated. Many thanks