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
Cosentyx ProjectCosentyx Project 

validation rule depending on multiple fields

Hi All,I have 4 fields.(2 checkbox fields and 2 text fields)
Checkbox field name: Account_checkbox__c
                                   Contact_checkbox__c
Text Fields: Lenght__c
                   Salary__c
             
The scenario will be like this.

Lenght__c (Text) == 10000(containing some data)
Salary__c(Text) == null(doesn't contain any data){if this contains any data don't throw the validation}
Account_checkbox__c = true (or) Contact_checkbox__c = true {any one of the field checkbox makes to true, throw validation}
then fire the validation.

Could you please help me out how to figure that out.

 

Best Answer chosen by Cosentyx Project
Rahul.MishraRahul.Mishra
Here you go:
NOT(ISBLANK( Lenght__c))  && ISBLANK(Salary__c)  && ( Account_checkbox__c || Contact_checkbox__c)

Mark solved if it does help you 

All Answers

Rahul.MishraRahul.Mishra
Here you go:
NOT(ISBLANK( Lenght__c))  && ISBLANK(Salary__c)  && ( Account_checkbox__c || Contact_checkbox__c)

Mark solved if it does help you 
This was selected as the best answer
Steven NsubugaSteven Nsubuga
AND (OR(Account_checkbox__c = true , Contact_checkbox__c = true), ISBLANK(Salary__c), !ISBLANK(Lenght__c) )
Try that