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
Rung41Rung41 

Picklist validation

Help with validation if one picklist is populated another one needs to be null.  Basically the user can only choose a value from Picklist 1 OR Picklist 2. Not both.
I tired the following validation rule but it's not working.

(ISPICKVAL(WidgetA__c '')) =
(ISPICKVAL(WidgetB__c, ''))
Best Answer chosen by Rung41
Pavan Kumar KajaPavan Kumar Kaja
Try using the below validation.

NOT(ISBLANK(TEXT(WidgetA__c))) &&  NOT(ISBLANK(TEXT(WidgetA__c)))

All Answers

Pavan Kumar KajaPavan Kumar Kaja
Try using the below validation.

NOT(ISBLANK(TEXT(WidgetA__c))) &&  NOT(ISBLANK(TEXT(WidgetA__c)))
This was selected as the best answer
praveen murugesanpraveen murugesan
Hi,

Above formula will work fine. If scenario like user should select one not both. Means you can use this.

OR(NOT(ISBLANK(TEXT(Type__c))) && NOT(ISBLANK(TEXT(TestPicklist__c))) , ISBLANK(TEXT(Type__c)) && ISBLANK(TEXT(TestPicklist__c)))
Rung41Rung41
Thanks Ashi, that worked!