0

Im trying to create a validation rule that states that if you have a picklist value then you cannot change a percantage field to 100%. Why is what I have letting it save?

AND( 
ISPICKVAL( FedCapture__Our_Role__c,'Subcontractor'), 
ISPICKVAL( FedCapture__Our_Role__c,'JV - Minority Partner'), 
ISPICKVAL( FedCapture__Our_Role__c,'JV - Managing Partner'), 
AND( FedCapture__Workshare__c = 1))

1 Answer 1

1

You cannot have one field contain multiple values. Right now your rule says the record is invalid if three different values are simultaneously selected. But that will never happen. You instead want:

AND(
    Percentage_Field__c = 1,
    OR(
        ISPICKVAL(Picklist_Field__c, "Value 1"),
        ISPICKVAL(Picklist_Field__c, "Value 2"),
        ISPICKVAL(Picklist_Field__c, "Value 3")
    )
)

Please note that logical clauses in formulae join all the clauses inside the function call. So having AND(singleClause) isn't any different than singleClause on its own.

1
  • I think you also want to change it so you compare to 100, not 1, but need to double check.
    – Adrian Larson
    Dec 28, 2017 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .