I have two percent fields in this validation rule

Day_Split__c + Night_Split__c < 1

Works well when both values are entered. However, if one of them is null, the validation rule evaluates to true.

Is there a formula or workaround without writing bunch of IF statements? Formula abs() did not help.


Found formula nullvalue(). The validation that worked is

nullvalue(Day_Split__c,0) + nullvalue(Night_Split__c, 0) < 1
  • 1
    On the link you provided there is a note on using BlankValue over NullValue, Use BLANKVALUE instead of NULLVALUE in new formulas. BLANKVALUE has the same functionality as NULLVALUE, but also supports text fields. Salesforce will continue to support NULLVALUE, so you do not need to change existing formulas.
    – Jenny B
    Jan 15 '15 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.