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
samsafin42samsafin42 

Ensuring value in dependent picklist matches with PREVIOUS value of the controlling field

Background:

We have a looong list of status and sub-status fields. For the sake of ease, we'll say we have four statuses: Intro, In Progress, Pass, and Fail. Within each of those, of course we have sub-statuses, and they are assigned via standard Field Dependancies functions.

Here's what I need to do:

Certain sub-statuses related to the the "Fail" status should only be available when the previous Status was "Intro", where as others can only be selected when the previous Status was "In Progress." I've been able to do it with a single value, but when I throw OR into the mix, it starts to fall apart.

I am so close to getting this, but it doesn't pass both positive and negative tests, and I'm now confusing myself. I've done a few different things, but this is the closest I've gotten:

PRIORVALUE(Status__c)<> "In Progress" 
&& 
ISPICKVAL(Status__c,'FAIL') 
&& 
NOT(
OR(
ISPICKVAL(Substatus__c,'1'),
ISPICKVAL(Substatus__c,'2'),
ISPICKVAL(Substatus__c,'3')
)
)

I've also tried adding "ISCHANGED" for the Status field...and switching out what is NOT or NOT EQUALS...I honestly don't know how many versions I've gone through.

So what am I missing?