Validation Rule for picklist value

  Kiến thức lập trình

I need a VR on a custom picklist field where we can restrict this value from being selected for any other state than HI. This new value should be selected only if opportunity state = HI and utility HI Utility. This is what I have but its throwing validation on all the picklist values even though the state is not HI.
AND(
NOT(
ISPICKVAL(Opportunity__c.State__c, “HI”) &&
OR(
ISPICKVAL(Opportunity__c.Utility__c, “utilitycompany1”),
ISPICKVAL(Opportunity__c.Utility__c, “utilitycompany2”),
ISPICKVAL(Opportunity__c.Utility__c, “utilitycompany3”)
)
)
)

LEAVE A COMMENT