Skip to main content
Miguel Egas ha fatto una domanda in #Formulas
Hi Folks, I have the following validationformula that is supposed to prevent the creation of the record unless the criteria is met, however, after implementing the validation, the record still gets created if a choose a date in the past.  For example if today is nov 13, and I chose Oct 20, the record should not be created.  What am I doing wrong?

 

AND(

WEEKDAY(Survey_Requested_Date__c) <> 2, /* Not Monday */

WEEKDAY(Survey_Requested_Date__c) <> 6, /* Not Friday */

Survey_Requested_Date__c >= TODAY() /* Date is in the future */

)

 
1 risposta
  1. 13 nov 2023, 15:50

    Never mind, I fixed my own error, but just in case someone else has the same problem, here is the solution:

    AND(

    Survey_Requested_Date__c>=Today(),

    WEEKDAY(Survey_Requested_Date__c) = 2 || WEEKDAY(Survey_Requested_Date__c) = 6

    )

    Basically, the formula needed to be AND OR

    Th pipes || are an OR statement, thus the second condition for AND includes and OR.  

     
0/9000