0

I have 2 dependent standard picklists (Fault1__c, Fault2__c) which are controlled by the same standard picklist (Secondary__c).

The reason I went down this path, is to get around the 2000 value picklist limit in Salesforce.

I need to make either Fault1__c or Fault2__c mandatory when the record status is updated to "Closed" - although this depends on what is selected with Secondary__c (the controlling picklist).

I had originally created the following validation rule when I only had 1 dependent picklist, which worked fine. But since I now have 2 - how should I cater for them both? The validation rule should either trigger for either one if one of them are activated.

AND(
RecordType.DeveloperName = 'Blah',
ISBLANK(Text(Fault1__c)),
Text(Status__c) = 'Closed'
)

Much appreciated.

1 Answer 1

0

So your picklist dependency already takes care of the fact that only 1 of the 2 is filled (and not both). So as far as I can see, you only need to still check if at least 1 of the 2 is filled. You can do this with an OR statement in the validation rule.

AND(
RecordType.DeveloperName = 'Blah',
OR( ISBLANK(Text(Fault1__c)), ISBLANK(Text(Fault2__c)) ),
Text(Status__c) = 'Closed'
)
2
  • Thanks Guy - I made the respective change to my validation rule, but now it's not triggering the rule when the record status is updated to "Closed". May 14, 2020 at 22:45
  • Must be the comma placement. I forgot the comma at the end of line 3. Maybe you put it in a different place? May 15, 2020 at 8:21

You must log in to answer this question.

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