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

If 1 field is populated, a related field cannot be empty


I am trying to create a validation rule that says if the Payment Type is a Check, then the fields Check Date and Check Number cannot be empty. this is what i have so far, but i keep getting an error message.


 NOT( NFG__Payment_Type__c,  "Check"),
 ISBLANK( Check_Number__c ))

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Hi Nina,


What are the datatypes of the fields in your formula? (Text, Number, Currency, Picklist, Multi-Picklist, Date, Date/Time, etc.)


If your Payment Type field is a Picklist, then something like this should work



AND( ISPICKVAL(PaymentType Picklist_Field, "Check"), OR( LEN(CheckNumber Text_Field) < 1, ISNULL(CheckDate Date_Field)))