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
mukesh guptamukesh gupta 

textfiled dependant on picklist value

Hi Expert,

I have two custom field on lead page,  picklist(Deceased, Minor, Incapacitated) and textField(datetype) , if selected value is "Deceased" then  textField will be show,  other wise textField will be hide.

Please suggest.

Many Thanks
Mukesh


 
Deepak Maheshwari 7Deepak Maheshwari 7

Hi Mukesh,

 

We cannot make text field dependent on picklist field. But we have one alternative solution for it.

We can restrict the user to change the value of Text field if selected value is Minor or Incapacitated.

We will create a validation rule as follows:

ISCHANGED(textField) && (ISPICKVAL( Picklist field, "Minor") || 
ISPICKVAL( Picklist field, "Incapacitated") )

Deepak Maheshwari 7Deepak Maheshwari 7

Hi Mukesh,

 

Hope the above solution works for you!

If not please let me know.

 

Thanks

Deepak

mukesh guptamukesh gupta
Hi Deepak,

Is there any option for field visibility on picklist selection.

Thanks
Mukesh
Deepak Maheshwari 7Deepak Maheshwari 7

There is 1 more solution. But I am not sure you would go for it or not.

 

Create 2 record types. And 1 more page layout in which that text field is not visible.

For each record type, assign different page layouts.

And then create a workflow rule:

 

In Rule criteria:  (ISPICKVAL( Picklist field, "Minor") || 
ISPICKVAL( Picklist field, "Incapacitated") )

 

In Action: Update the record type Id accordingly