0

I have field that is decimal and by default I have 0.00 so when the page loads it has the default value which is again 0.00, when I try to validate ISBLANK OR ISNULL it passes the validation but how I can enforce the user to enter actual value and throw the validation error when it is 0.00 ?

AND(ISPICKVAL(Status__c, "Completed")
,
OR(
 ISNULL(Emp_num__c),
 IF(Emp_num__c = "0.00") //<<<error: Error: Incorrect parameter type for operator '='. Expected Number, received Text

))

2 Answers 2

1

You want to change your validation rule from just "ISBLANK" to "= 0". Having a value of "0.00" is not the same as being "Null" or "Blank". You could add in a separate add-on to your rule though using AND so that you can make sure it isn't actually blank/null or "0".

OR((ISBLANK(Emp_Num__c)),(Emp_Num__c=0))

3

The field Emp_num__c is a number field. To validate that the user enters a value that is not null, and not 0; you would use the following:

OR(
  ISNULL(Emp_num__c),
  Emp_Num__c == 0
)

If you only want positive values:

OR(
  ISNULL(Emp_num__c),
  Emp_Num__c <= 0
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .