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
Phani PYDIMARRY 11Phani PYDIMARRY 11 

Help with a validation rule for two multi picklist values

Hello,

I have two two picklists with same values per say
P1  P2
A     A
B     B
C     C

If I select A and B in P1 and select B and C in P2, I need to throw an error. Basically I need a validation rule to allow user to only select those values they selected in P1. I am a bit new to salesforce. Please help.

Regards,
Vineeth
EuphoristeEuphoriste
Hello,

Try this : 
AND(
    OR(
        INCLUDES(P1,"A") <> INCLUDES(P2,"A"),
        INCLUDES(P1,"B") <> INCLUDES(P2,"B"),
        INCLUDES(P1,"C") <> INCLUDES(P2,"C")
      ),
    ISCHANGED(P2)
)
Regards.