0

I am trying to put a validation rule in place: If City is Mumbai it should not be allowed to change it to another, whereas if City is not equal to Mumbai it can be changed to anything but not Mumbai. This is something I drafted but doesn't seem to working as expected.

IF(PRIORVALUE(City__c)= "Mumbai", 
ISCHANGED(City__c), 
OR(PRIORVALUE( City__c)<> "Mumbai", 
ISPICKVAL(City__c, "Mumbai")))
0

1 Answer 1

1

You still need to use the ISPICKVAL formula for each branch. However, you can still reorganize the formula to fix the problem:

AND(
  ISCHANGED(City__c),
  OR(
    ISPICKVAL(PRIORVALUE(City__c), "Mumbai"),
    ISPICKVAL(City__c, "Mumbai")
  )
)

You must log in to answer this question.

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