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
kfrankfran 

Help with Validation Rule Please

Hi,
 
I need the finishing touches to the following validation rule so that when Picklist Value in the StageName Field is changed to "Won-Contract Signed", users must make sure to select picklist value "Visited" beforehand.  So far, the formula I have does the job, however, if users need to go back and edit the Opportunity Record for simple reasons such as editing the spelling of an Opportunity Name, etc...the Validation Rule makes it so that in order to save any of the most recent edits, the user has to select Picklist Value "Visited" Again -- which ends up skewing my Stage History since  "visited" shows up twice. 
 
How can I change the rule so that it only takes affect on the very first instance that the PICKLIST Value is changed, but not future edits. 
Here is the rule I currently have below:
 
 
 
AND(
     ISPICKVAL( StageName, "Won-Contract Signed") ,
     NOT(ISPICKVAL( PRIORVALUE(StageName) ,"Visited") ) )
 
 
Thank you!
CaptainObviousCaptainObvious

How about this...

 

Code:
AND(
     ISCHANGED( StageName ),
     ISPICKVAL( StageName, "Won-Contract Signed") ,
     NOT( ISPICKVAL( PRIORVALUE(StageName) ,"Visited") ) 
)

 
kfrankfran

This worked!  Thank you so much.

 

Kim