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
Katie ApplebyKatie Appleby 

conditional validation rules on 2 picklists

Hey there,
I’m trying to require that one picklist field is conditionally required when the value in another picklist field is selected. Therefore, the picklist field “Resigned_Reason__c” is required only when the picklist field “Substatus” has a value of “Voluntary | Resigned”
I keep getting different errors. The last one saying Incorrect number of parameters for function 'TEXT()'. Expected 1, received . 

Here's my validation rule:
AND (NOT (ISBLANK(TEXT (ts2extams__Substatus__c, "Voluntary | Resigned"))), ISBLANK(TEST(Resigned_Reason__c))

Anything stand out that I need to fix? Thanks!

 
Best Answer chosen by Katie Appleby
CharuDuttCharuDutt
Hii Katie
Try Below Validation
AND(ISPICKVAL(ts2extams__Substatus__c, 'Voluntary | Resigned'), ISBLANK(TEXT(Resigned_Reason__c)))
Please Mark It As Best Answer If It Helps
Thank You!

All Answers

CharuDuttCharuDutt
Hii Katie
Try Below Validation
AND(ISPICKVAL(ts2extams__Substatus__c, 'Voluntary | Resigned'), ISBLANK(TEXT(Resigned_Reason__c)))
Please Mark It As Best Answer If It Helps
Thank You!
This was selected as the best answer
mukesh guptamukesh gupta
Hi Kaite,

Few mistake in your validation, you are using TEST instead of TEXT,  and your brackets not closed properly
 
AND(
  ISPICKVAL(ts2extams__Substatus__c, "Voluntary | Resigned"),
  ISBLANK(TEXT(Resigned_Reason__c))
)

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh 

 
Katie ApplebyKatie Appleby
Thank you so much, Charu! The way you displayed the rule makes absolute sense (now in hindsight). Really appreciate it. It worked when I tested it. 
Merci 10Merci 10
Hi my friends, I have to make a validation rules to prevent to make a record for a partcular record type, id the record exist or belong the the record type, the vr has to avoid record,  any ideas?