Forum Discussion
Cascading Drop Down Lists in SharePoint
Hi all,
is anyone know a better way (with no coding is better ...) to have cascading drop down lists in sharepoint online like this : http://www.markrackley.net/2014/05/20/cascading-drop-down-lists-in-sharepoint-office-365-using-rest/
merci !
25 Replies
- dcookauCopper Contributor
Damien NICOLAS , I have a solution I have just applied to my SharePoint Online List, and I'm not a global admin and I'm not using complex code or 3rd party apps - I'm just using multiple fields.
Setup:
1. Create Level 1 category list in a choice field - cat1.list
2. Create Level 2 category lists in a choice field - cat2.lista, cat2.listb (essentially you are creating a field for each option in the Level 1 list)
3. Create a resolver field. It is a calculated filed. This is where we actually resolve the selected category. The calculation would be: =IF([cat1.list]="List A",cat2.lista,IF([cat1.list]="List B",cat2.listb,[cat1.list]))
This is for only two lists and essentially the resolver will return either the value selected in the 2nd list, or just the value in the first list if nothing is selected.
So, the next part if fixing the form so it's not just filled with level 2 category choice fields - this is not a problem in SharePoint Online using the Edit Columns feature of a List Form. You simply add a Conditional formula on the field so that it is true when the category is called. The formula would look like this for cat2.lista: =if([$cat1.list]=='List A','true', 'false').
If you also have some PowerApps, you can essentially use the same trick using the visible filter - essentially you are limiting the visibility of the 2nd Category options to the one that matches the selected Category 1 option. In reality, all options are there, but just not visible - the resolver sorts out any discrepancy if multiple have been selected.
I wouldn't recommend this if you have a long list in your Category 1 list, as you're going to have some long formulas and lost of choice fields to sort out. However, I'm using 4 top-level choices and I could probably keep going until about 10 before it became a real problem.
Hope that helps,
David
- ThomasC2232Copper Contributor
Hello, I am trying to apply your suggestion in my case. Do I need to create two separate Lists for Level 1 and Level 2 category. My cascade drop down is
Level 1 = North America, South America, Asia.
Level 2 = Canada. USA, Nicaragua, Paraguay, India, Japan
If Level 1 = North America, Level 2 will only show options Canada and USA
if Level 1= Asia, Level 2 will only show options India and Japan.
How can I use your solution (=IF([Level 1]="North America, Level 2 ....)? Your help will be much appreciated.
Thanks.
Thomas.
- RobElliottSilver Contributor
It's a very old post so probably the OP has moved on to something else, but cascading dropdowns from SharePoint lists is very easy to do these days with PowerApps.
- Brian RiesenBrass Contributor
Damien NICOLAS This is an older thread, but have you seen SPEasyForms yet? It's an open-source SharePoint solution that loads jQuery constructs to SharePoint forms in a WYSYWIG GUI. No coding required!
Cascading drop-down list fields is just one option. You can also add form tabs, multiple columns, field level permissions, conditional hidden/read-only/edit field options, auto-fill from other lists, and more.
- https://www.youtube.com/channel/UC5NPldqncglvAQY5gswtxGw
- https://speasyforms.intellipointsol.com/
- Jimmy HangBrass Contributor
Have you given the new List PowerApps a try?
Should be something like this:
https://powerusers.microsoft.com/t5/General-Discussion/CASCADING-DROPDOWN-WITH-3-COLUMNS/td-p/80483
- Krishant LodhiaBrass ContributorFast forward to 2018, the issue still persists as far as I know.
- Simon HowellCopper Contributor
There are a couple of suggestions on the SharePoint Uservoice site for cascading lookup lists. Unfortunately one of them has 60 votes and Microsoft don't generally look at ideas under 100 votes.
https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/7140453-i-hope-cascaded-lookup-column-and-chart-webpart-in
- tetete mnnujiCopper Contributor
I am trying to make this process work for me in Sharepoint.
I have a main list called registration.
I also have 3 lists called Employee, Courses and Categories.
Course List has columns: Course, category, Course ID, Date, etc
Categories List has one columns, category
Employees Field has Fields : Department, Employee ID, Employee Name etc
From the Registration List, when I Select a category, In the drop down I only want to select a course, on the courseID field
When I Select a Department, from the Employee List, I only want to see Employees in that department in the Employee ID field
When I Select a course, I only want to choose dates for that course
I have seen the codes above, but I am having a hard time making it to work.
Any help will be greatly appreciated.
- Nigel_Price9911Iron ContributorYou could always try this one -> http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPCascadeDropdowns
- Anonymous
Hello,
A easy way is following this blog post : http://spjsblog.com/2013/08/20/convert-text-fields-to-cascading-dropdowns-unlimited-number-of-levels/
You can download it from here: http://spjsfiles.com/SharePoint%20JavaScripts/CascadingDropdowns_v3/v3.525/spjs_casc_v3.525.zip
No need to create multiple lists, only one list and it's easy.
Sample:
<script language="javascript" src="/SiteAssets/JS/SPJS/SPJS-Casc_min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
spjs.casc.init({
lookupList:"ListToLookAT",
lookupListFields:["Title","Title1"],
thisListFields:["Title","Title1"],
dropDownDefaultvalue:"select",
hideEmptyDropdowns:true,
autoselectSingleOption:true,
clearInvalidSelection:true,
debug:false
});});
</script>Thanks,
Catalin.
- tetete mnnujiCopper Contributor
Wonder if you can help me with this
I am trying to make this cascade look up work for me on Sharepoint Lists.
I have a main list called registration.
I also have 3 lists called Employee, Courses and Categories.
Course List has columns: Course, category, Course ID, Date, etc
Categories List has one columns, category
Employees Field has Fields : Department, Employee ID, Employee Name etc
From the Registration List, when I Select a category, In the drop down I only want to select a course, on the courseID field
When I Select a Department, from the Employee List, I only want to see Employees in that department in the Employee ID field
When I Select a course, I only want to choose dates for that course
I have seen the codes above, but I am having a hard time making it to work.
Any help will be greatly appreciated.
- Dean_GrossSilver Contributor
I would recommend using PowerApps to create a custom form, here is an example https://powerusers.microsoft.com/t5/PowerApps-Community-Blog/Cascading-dropdowns-for-single-line-of-text/ba-p/22927 from DaR0GaE1
- Katie PegoraroBrass Contributor
This is one of the most frustrating things for us in SharePoint Online, too. All of the people who ask for forms want this, and they can't do it themselves, even as power users. It needs client-side code, and then the IT department gets involved in creation and maintenance of every form. We are also avoiding InfoPath, and waiting for a better solution from Microsoft.
- Paul Van BeekBrass Contributor
Especially with a small IT staff. No way for a small team to keep up with requests and then maintain them, too.
- Damien NICOLASCopper Contributor
Someone use this app ?
http://www.kwizcom.com/sharepoint-apps/kwizcom-apps-foundation/overview/
- Agree on that, the other way around could be to use third party products that already cover this gap
- Kathryn AlexanderCopper ContributorIt's possible to do it with InfoPath only. This you tube video shows how (albeit on an older version of SharePoint, so you have to "translate" to the current version.) https://www.youtube.com/watch?v=-HnLhXVQf-M I worked through it and got cascading drop downs to work in SharePoint Online with InfoPath
- Savannah PyleCopper Contributor
that video is using sharepoint 2010...
- No coding implies to find a third party solution...by the way, the approach described in the blog post is correct...of course, you can find different "coding" flavours to get the same result