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
StardustStardust 

Validation Rule to check

This validation rule makes sure that if either the checkbox  Non_Standard__c is checked or the text field Non_Standard_Terms_Conditions__c is populated, the user has to fill in the Non_Standard_Terms__c multi-select pick list.

This is not working:
AND (
OR(Non_Standard__c = TRUE, NOT (ISBLANK(Non_Standard_Terms_Conditions__c ))),
ISBLANK( Non_Standard_Terms__c )
)

Could you please help me?

Thanks a lot in advance.
 
RamuRamu (Salesforce Developers) 
I do not see any issues in your formula, I tried the same one on my test org with the below formula logic and it is working correctly. 
AND(OR( Checkbox__c =true , NOT(ISBLANK(textbox__c ))),ISBLANK( Multiselect__c ))
StardustStardust
The problem is that the rule produces a message even when both fields Checkbox__c and textbox__c are blank. The rule should not evaluate to true in that case.

What am I missing? I think the following info is not relevant, but I am sharing it, just in case:

Multiselect__c is a required field, but dependent on Checkbox__c.
There is a WF rule which makes sure that if textbox__c is populated, Checkbox__c gets checked.
Vatsal KothariVatsal Kothari
You can refer below validation rule:
IF(OR(Non_Standard__c = TRUE ,NOT(ISBLANK(Non_Standard_Terms_Conditions__c ))) , IF(ISBLANK( Non_Standard_Terms__c ),true,false),false )
If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal
RamuRamu (Salesforce Developers) 
Hi, In that case It seems to be an issue with some other conflicting validation rule written for the same object with the same error message. Please verify this and confirm.
 
StardustStardust
I have tried this now, and it still does not work:

IF(AND(Non_Standard__c = FALSE, ISBLANK(Non_Standard_Terms_Conditions__c )), FALSE,

IF(OR(Non_Standard__c = TRUE ,NOT(ISBLANK(Non_Standard_Terms_Conditions__c ))) , IF(ISBLANK( Non_Standard_Terms__c ),true,false),false )

)

I hope someone can help! The problem is that I am getting the error even though both fields are empty.