Skip to main content

Hello,

 

I'm getting mad with this criteria I used for a validation rule on Opp.ty.

 

In particular the problem is on the NOT CONTAINS part (bold).

 

I want that the validation triggers every time the opp.ty is Licence AND Maintanance Rate=null but in case the Oppty Name contains the words LRBX or RUST.

It works if the Oppty Name contains LRBX (validation is not triggered) and doesnt' work if contains RUST (validation is triggered anyway)

 

Any suggestion?

 

​​​​​​​

 

AND( 

 

(ISPICKVAL( Type , "Licence")), 

 

ISNULL( Maintenance_Rate__c ), 

 

OR(NOT 

 

(CONTAINS(Name, "LRBX")), 

 

(CONTAINS(Name, "RUST"))) 

 

)
9 answers
  1. Jun 27, 2019, 1:16 PM
    For this you have to use UPPER function to convert Name into upper case and then compare. Try this out .

     

    AND( 

     

    (ISPICKVAL( Type , "Licence")), 

     

    ISNULL( Maintenance_Rate__c ), 

     

    NOT(CONTAINS(UPPER(Name), "LRBX")),

     

    NOT(CONTAINS(UPPER(Name), "RUST"))

     

    )
0/9000