Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Conditionally display picklist values

Avatar

Level 2

Hi,

I have a custom form that includes a dropdown field called 'Country' along with other fields. I would like to display the picklist values in another dropdown field called 'States' selectively. Specifically, based on the value selected by the user in the 'Country' dropdown, the 'States' dropdown should only show the states that belong to that particular country.

Is this possible?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

 

The short answer is No, @vevommi.

 

What you are describing is referred to as “cascading drop downs”. The concept has been around for many years, but it not supported within the native custom form logic.

 

If you are determined to have something similar, though, I invite you to consider the following.

 

  • Create your country drop down with the appropriate values (eg USA, Canada, etc.)
  • For each country, create a Country State, drop down (eg USA State, Canada Province, etc.) with the appropriate values (eg Arizona, etc. for USA State, Alberta, etc. for each Canadian Province)
  • Add display logic so that upon a users selection of a particular country (eg USA) the appropriate country province drop down is then revealed (eg USA State)
  • Create a calculated parameter, that checks all of the above and concatenates the visible selected country with the selected state (eg CONCAT({DE:Country},” | “,IF({DE:Country=“USA”},{DE:USA State},IF({DE:Country=“Canada”},{DE:Canada Province},…}}))
  • Use the latter for reporting, (i.e., grouping, filtering, charting, etc.)


If you decide to undertake the latter, good luck, and I am curious to hear how you make out.

 

@MattMi3.…Matt, given this is a fair bit of work to configure but a relatively static set of data, would you consider building out the definitive works for this and providing it as a Blueprint for folks to then install into in their own Workfront instance to either use As Is, or adapt by Hiding what they don’t need, or adding what they do need?

 

Regards,

Doug

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

 

The short answer is No, @vevommi.

 

What you are describing is referred to as “cascading drop downs”. The concept has been around for many years, but it not supported within the native custom form logic.

 

If you are determined to have something similar, though, I invite you to consider the following.

 

  • Create your country drop down with the appropriate values (eg USA, Canada, etc.)
  • For each country, create a Country State, drop down (eg USA State, Canada Province, etc.) with the appropriate values (eg Arizona, etc. for USA State, Alberta, etc. for each Canadian Province)
  • Add display logic so that upon a users selection of a particular country (eg USA) the appropriate country province drop down is then revealed (eg USA State)
  • Create a calculated parameter, that checks all of the above and concatenates the visible selected country with the selected state (eg CONCAT({DE:Country},” | “,IF({DE:Country=“USA”},{DE:USA State},IF({DE:Country=“Canada”},{DE:Canada Province},…}}))
  • Use the latter for reporting, (i.e., grouping, filtering, charting, etc.)


If you decide to undertake the latter, good luck, and I am curious to hear how you make out.

 

@MattMi3.…Matt, given this is a fair bit of work to configure but a relatively static set of data, would you consider building out the definitive works for this and providing it as a Blueprint for folks to then install into in their own Workfront instance to either use As Is, or adapt by Hiding what they don’t need, or adding what they do need?

 

Regards,

Doug

Avatar

Community Advisor

If I'm understanding you correctly, you can do this with display logic in your custom form. I had a situation where I had a dropdown and depending on the value selected, a different dropdown would show. It was around 8 different dropdown fields to create but only the appropriate dropdown would show based on the initial dropdown selection.
- Create your country dropdown
- Then create a dropdown for each respective country's states - USA dropdown with its states, separate Canada with is provinces, etc.
- In the display logic of these state dropdowns, you can indicate to only have it display if X country is selected in your country dropdown. Add the logic for each state dropdown.

 

If you found this helpful, please mark correct to help others : )

If this helped you, please mark correct to help others : )

Avatar

Community Advisor

Doug is correct - not possible using just two fields.
Doug and Madalyn described the current workaround which requires many fields.
What you are asking about is preferred, as it would simplify reporting in multiple ways.

Cascading drop downs is often lumped in to the same category as "dynamic data validation."
E.g., "only allow user to select California as the state value if they previously selected USA as the country value."
Data validation also includes the ability to create rules like, "don't allow user to select a date that occurs before today's date." 

Please vote for and socialize the idea with most votes to bring this functionality to Workfront, found here:
https://experienceleaguecommunities.adobe.com/t5/workfront-ideas/custom-forms-add-validation/idi-p/5...

 

If you like my content, please take a moment to view and vote on my Idea Requests: https://experienceleaguecommunities.adobe.com/t5/user/viewprofilepage/user-id/17555852/contributions...

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf

Avatar

Community Advisor

@vevommi how many countries are you needing to add a state dropdown for? This really isn't much work depending how many you add. I have done this same thing without any calculated fields, just separate dropdown fields with logic. 

If this helped you, please mark correct to help others : )

Avatar

Level 2

Hi Team,

The idea of having different fields for each country and then adding display logic is not feasible as it would result in multiple fields, right?

Ideally, we should be able to conditionally filter the picklist options of a dropdown field. Just imagine the scenario where the country list is more than 10 and each country has more than 25 states. Furthermore, if the country dropdown field is a Multi Select, and we need to show the states of the selected countries together. Additionally, if the states have city lists and we need to display them based on the selected state, the complexity will further increase and  the form will become lengthier and the user experience won't be optimal. 

The display logic should be implemented at the picklist level along with the field level. Currently, we can only show or hide a picklist value of a dropdown field. However, if Workfront has display logic applied at the option level, allowing us to show or hide options based on the user's selection of other fields, we can greatly reduce the need for creating a large number of fields in a custom form.

This feature would be a valuable addition and it is worth discussing and socializing this idea to bring this functionality to Workfront.