• Ellie Afatmirni
  • NEWBIE
  • 5 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I want to throw an error when a picklist value that contains "PP" is changed to a picklist value that does not contain "PP". Thanks in adavnce :)
I want to throw an error when a picklist value that contains "PP" is changed to a picklist value that does not contain "PP". Thanks in adavnce :)

Hello,

 

I have a Picklist in which one of the fields is "Error". On a user changing form fields and choosing to choose a different picklist value I want a validation rule to check the previous value of the picklist field and to only allow certain values to be picked if previously at "Error".  I have tried the following.

 

OR(AND(PRIORVALUE(Request_Status__c)='Error' , Request_Status__c<>'Draft Request'),AND(PRIORVALUE(Request_Status__c)='Error' , Request_Status__c<>'Endorse'))

 

I receive an error as follows:

Error: Field Request_Status__c is a picklist field. Picklist fields are only supported in certain functions. Tell me more

 

The "Tell me More" link brings me to teh following article  https://avaya--c4rdev.cs12.my.salesforce.com/help/doc/user_ed.jsp?loc=help&target=tips_on_building_formulas.htm%23picklists_and_msps&section=Customizing

 

In which it states "

  • PRIORVALUE(Only in assignment rules, validation rules, workflow field updates, and workflow rules in which the trigger type is set to Every time a record is created or edited)"

I do want this to run though every time an edit occurs though so figured it should work.

 

Does anyone happen to know from looking at the above what I may be doing wrong and a way to get around this?

 

Thanks in advance.