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
Dave The RaveDave The Rave 

Process Builder - Formula help with AND OR statment

All,

Currently In the blue diamond in the process builder, I have the formula with the first 4 lines below, this works perfectly. However, I would like to add the last 2 lines below to my formula. There are 3 criteria A,B,C ( 2 rows below per criteria)

 IF  formula A AND (B OR C) = TRUE (criteria is met), the question is where do I add the AND and OR statements and where do I put the extra brackets? Can any one help by adding AND and OR statement and brackets in Red text, so I can improve my knowledge?
 
A
 
[Registration_Layer__c].CertRegOrganisation2__c ="SCVM" &&[Registration_Layer__c].ActivityStatus2__c  = "active" &&
[Registration_Layer__c].ObligatoryPointsReq__c = 9 &&
 
 
 
B
 
MONTH([Registration_Layer__c].CertRegFrom__c) >= 5 && MONTH([Registration_Layer__c].CertRegFrom__c) <= 8 &&
YEAR([Registration_Layer__c].CertRegFrom__c) = YEAR(TODAY())
 
 
 
C
 
MONTH([Registration_Layer__c].CertRegUntil__c) >= 5 && MONTH([Registration_Layer__c].CertRegUntil__c) <= 8 &&
YEAR([Registration_Layer__c].CertRegUntil__c) = YEAR(TODAY())
 
 

Below the formula are all together: (3 rows per letter A, B, C)
 
[Registration_Layer__c].CertRegOrganisation2__c ="SCVM" &&
[Registration_Layer__c].ActivityStatus2__c  = "active" && [Registration_Layer__c].ObligatoryPointsReq__c = 9 &&
 
MONTH([Registration_Layer__c].CertRegFrom__c) >= 5 && MONTH([Registration_Layer__c].CertRegFrom__c) <= 8 &&
YEAR([Registration_Layer__c].CertRegFrom__c) = YEAR(TODAY())
 
MONTH([Registration_Layer__c].CertRegUntil__c) >= 5 && MONTH([Registration_Layer__c].CertRegUntil__c) <= 8 &&
YEAR([Registration_Layer__c].CertRegUntil__c) = YEAR(TODAY())

 
Ajay K DubediAjay K Dubedi
Hi Dave,

As per your requirement, I can understand that you want your formula logic to be implemented in  "A AND (B OR C)".
If this is true then below is the logic of all the formulas that will surely work for you.

[Registration_Layer__c].CertRegOrganisation2__c ="SCVM" && [Registration_Layer__c].ActivityStatus2__c  = "active" && [Registration_Layer__c].ObligatoryPointsReq__c = 9 && (
  MONTH([Registration_Layer__c].CertRegFrom__c) >= 5 && MONTH([Registration_Layer__c].CertRegFrom__c) <= 8 && YEAR([Registration_Layer__c].CertRegFrom__c) = YEAR(TODAY()) ||
 MONTH([Registration_Layer__c].CertRegUntil__c) >= 5 && MONTH([Registration_Layer__c].CertRegUntil__c) <= 8 && YEAR([Registration_Layer__c].CertRegUntil__c) = YEAR(TODAY()))

You can reply back if you find any issues.

Thank you!
Ajay Dubedi