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
FinneyFinney 

Validation rule to make picklist mandatory if certain value in another picklist field selected

Hi,

 

I have two fields here,

Why buying? is a picklist field which has 2 values. which are 1) To Live and 2) To Rent

Home buyer area tour is also a Picklist field with 2 values

If Why buying equals To live then I need to make the Home buyer area tour picklist a mandatory. 

Can anyone tell me the validation rule for this please

Best Answer chosen by Admin (Salesforce Developers) 
IspitaIspita

hi,

sure ...

I think you can achieve this using validation rules :-

 

AND(ispickval(Why buying, "ToLive"), Len(Text(Home buyer area tour))=0 ))

Your validation rule fires now you can specify the error message "If why buying is set to "To live" the other picklist cannot be null"   

 

 

Hope this helps...

 

 

All Answers

IspitaIspita

hi,

sure ...

I think you can achieve this using validation rules :-

 

AND(ispickval(Why buying, "ToLive"), Len(Text(Home buyer area tour))=0 ))

Your validation rule fires now you can specify the error message "If why buying is set to "To live" the other picklist cannot be null"   

 

 

Hope this helps...

 

 

This was selected as the best answer
FinneyFinney

Hi Ispita, How u doing?

 

Can u please help me with this?

 

Thanks

FinneyFinney

Tell you what Ispita, You are a star.

 

Thanks a million for helping me again.

IspitaIspita

Thankx :)