Skip to main content
Hi, I am working on a validation rule which checks when a user enters start date and end date, the term field that is calcuated automatically should be either one year, two year or three years not more than that or not even should be in between the two ranges.

 

This is applied to specific products and rest of the products it can be in middle range.

 

This is my validation rule:

 

AND(

 

LEFT ( Product_Code__c ,3) = "ANN", 

 

NOT(CONTAINS(LEFT(TEXT( Number_of_Terms__c ),4),"1.00")) || NOT(CONTAINS(LEFT(TEXT( Number_of_Terms__c ),4),"2.00")) || NOT(CONTAINS(LEFT(TEXT( Number_of_Terms__c ),4),"3.00"))

 

)

 

It seems that it fails for any date range. The error message comes up even the term is 1,2, 3 or 1.28,2.15 etc.

 

Please help
14 respuestas
0/9000