+ Start a Discussion
lil_rangerlil_ranger 

Validation Rule help

AND( 
ISPICKVAL(StageName, 'Closed Won'), 
ISBLANK( DiscountReasons__c), 
AND( 
OR( 
$RecordType.Name = "Partner Opportunity", 
$RecordType.Name = "End User Opportunity",
AND(
OR(
ISBLANK(MaxDiscountRequested__c)=FALSE,
MaxDiscountRequested__c > 0%
)))))

 Hi,

 

I need help creating a validation rule.  The MaxDiscountRequested__c is a formula (percent) field.  I'm trying to get it to display the error message, when that field is blank or greater than 1%.  Is this possible with a formula field?

 

Any help is greatly appreciated.

 

Thanks!

goabhigogoabhigo

Since MaxDiscountRequested__c is a formula percent field use 0.01 for 1%, so 1 means 100%.

 

Also you may want to check whether the above really works mainly because the order of execution of validation is before that of formula evaluation I guess. So even after using decimals (0.01) you have to put the formula logic in place of MaxDiscountRequested__c. Let me know if I am not clear.

 

Also to check whether the field is blank you can use - ISBLANK( MaxDiscountRequested__c ). I am not sure why you are using ISBLANK(MaxDiscountRequested__c)=FALSE.

lil_rangerlil_ranger

I tried using MaxDiscountRequested__c > 0.00  ,but it's still throwing my error message when the discount requested is 0%

 

 

goabhigogoabhigo

Just use 0, not 0.00

lil_rangerlil_ranger

I also tried 0, but still had the error thrown