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
Jeff Urban 2Jeff Urban 2 

Two pick list fields - if then

We have two large picklist fields - Hospital Sector and Main skill pick list (MSPL)   MSPL is much larger.  I'm trying to have our searching easier, so...say we have Financials which encompasses like 15 MSPL items.  I'm trying to get it set ukp to where each module correlates with a module.  so we would only have to look up "Financials" and not all of the items.  

It would have to be a "Contains" field.  Like, IF MSPL Contains PharmNet, Hospital Sector shows Pharmacy,  There is a ton of these.  Probably 300+ in MSPL and 30+ in the Hospital Sector. And each MSPL can be with more than one sector. (but that is in rare cases, and i could change if necessary.    I've got it all drawn out....just don't know where to go next.  I'm worried the coding for this is going to be nuts.

Any suggestions?
Deepak Maheshwari 7Deepak Maheshwari 7

Please create dependent picklist.

Waqar Hussain SFWaqar Hussain SF
Hi Jeff,

What I have understood is that you want to show MSPL picklist values based on selected Hospital Sector.
To accomplish this, You can use Salesforce Dependent picklist feature. You will have make Hospital Secotor as Controlling picklist and MSPL as dependent picklist field.

See how to make picklist fields dependent
https://help.salesforce.com/articleView?id=fields_defining_field_dependencies.htm&type=5
Jeff Urban 2Jeff Urban 2
Can they both be multi pick lists or not? Sent via the Samsung Galaxy S8+, an AT&T 4G LTE smartphone
Waqar Hussain SFWaqar Hussain SF
Multi-select picklists can only be the dependent field. Means You can only make MSPL as multiselect but the Controlling field i.e. Hospital Secotor should be single select picklist field.
Jeff Urban 2Jeff Urban 2
Actually it's the opposite from two above.  I want the Sector be filled filled out by what is selected in the MSPL.  Think of it like this. 

I have two "sectors".  Call them Financials and Technical.  Each of these sectors have multiple MSPL items that they would relate to.  So for Financial - say (Charges, Revenue Cycle,ProFit)  and Technical (Cache, Security, CORE)

What I'm wanting is if I select anything in the MSPL that Financials will show up in the sector.  So on and so forth.  Almost like doing a search.  IF MSPL contains Charges, put Financials.  

Where it is getting dicey is what if I select Charges AND Revenue Cycle I don't want it to show up twice.  Also if I selest Charges and Cache, I'd like the Sectors piece to show "Financials; Technical" etc.

Does that make better sense?
Waqar Hussain SFWaqar Hussain SF
Yes Jeff,

For this scenario, you will have to create a picklist field for MSPL and a formula field for Sector. The Sector formula field will be automatically filled with either Financials or Technical based on selected  MSPL.

See how to create a formula field in Salesforce
https://help.salesforce.com/articleView?id=customize_formulas.htm&type=5

Thanks