function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BCBBCB 

Validate sum of several fields

Hi,

Looking for some help with his validation rule

 

AND( Restricted__c + Unrestricted__c + Designated__c + Initiatives__c  = UnitPrice )

 

Just want to check that the Total (Unit Price) is equal to the entries in all of these fields.

 

This rule does not seem to be working.

 

Thanks

 

Brian

CheyneCheyne

You don't need to use the AND function, since you only have one condition. Also, if your error condition formula is true, then an error message will be displayed, so your formula should check if the sum of the entries is not equal to Unit Price. The formula should read as follows:

 

Restricted__c + Unrestricted__c + Designated__c + Initiatives__c  <> UnitPrice

 

Hope this helps.

BCBBCB

Cheyne,

Thanks, I will give that a try,

 

Brian