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
phpFanphpFan 

How do I verify status of a check box

I had an earlier post where I was trying to validate that a valid option had been chosen in a picklist.  I have that working now.  However, my picklist is being controlled by a checkbox.  I only want the validation on the picklist to fire when the checkbox is checked.  This is obvious since you can't select the picklist when the box is unchecked.  I've tried ISNULL(vendor__c) but it says it's an invalid argument.  I've tried vendor__c = TRUE.  That doesn't work either.  vendor__c = checked? nope. 
 
AND(ISNULL( Vendor__c )  = FALSE, ISPICKVAL( Vendor_Type__c , ""))
IF(ISNULL( Vendor__c )  = FALSE, ISPICKVAL( Vendor_Type__c , ""))
 
neither of these work either.  Any suggestions?
 
unfortunately I'm a PHP programmer who had SFDC admin thrown in my lap=P
CJagannathCJagannath

Hi,

 

When you’re using AND function it checks whether all the arguments are true. Checkbox field itself returns either true or false. So you don’t need to explicitly set the value of a checkbox.

 

Type in the following in your validation rule

 

AND(Vendor__c , ISPICKVAL(Vendor_Type__c, "") )

 

Thanks and regards,

Jagannath

phpFanphpFan
Awesome! thanks.