Multilevel Cascading Dropdowns for SharePoint 2013, 2016, and O365 Classic forms

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025

Комментарии • 104

  • @MarkRackley
    @MarkRackley  5 лет назад +3

    Do you have a request that you'd like me to create a video for? How to do something in #SharePoint / #MicrosoftTeams / #Office365? A code sample you'd like to see? Or a blog post you'd like me to expand on? Well let me know!! aka.my/Rackley

    • @09289968476
      @09289968476 4 года назад

      Thank you so much for this video, this is what I really need right now. I just have a question, I created a list column but not a lookup but a choice can i still make cascading drop down with it? Thank you

    • @MarkRackley
      @MarkRackley  4 года назад

      @@09289968476 It has to be a lookup in order to work.

    • @vinaabella414
      @vinaabella414 4 года назад

      Hi Mark, this is so helpful and I got it to work on a new form. Thank you! However, when I tried using both Tabify (www.markrackley.net/2015/12/03/tabify-your-sharepoint-forms/) and this Cascading Dropdown in one form, the Cascading Dropdown stops working... would you know why? Thanks!

  • @willymccann
    @willymccann 5 лет назад +2

    great tutorial and script Mark, best cascade option I've seen in SP yet, cheers

  • @jackchabowskistaff642
    @jackchabowskistaff642 8 лет назад +3

    This Video is great so informative, I subscribed to your channel. Like that Rob guy said I don't understand why you have a single dislike. they give you dislikes because they are jealous that they don't have your knowledge. GREAT JOB MARK!!!

  • @Warsong27
    @Warsong27 7 лет назад

    Great Video Mark. Many thanks for taking the time and uploading this gem.

  • @dellades
    @dellades 6 лет назад +1

    Absolutely wonderful! I am inspired to learn Java scripting. It was so easy to understand the way you explained. Thank you.

  • @theresebaker4515
    @theresebaker4515 7 лет назад

    Mark, you are awesome! Thanks for sharing your solutions. I've reviewed several of them and they are all great.

  • @vengenSR
    @vengenSR 7 лет назад +1

    Can't find words on how You helped me. Thank you.

  • @hi-chernik
    @hi-chernik 3 года назад

    Thank you Mark for this perfect tutorial.

  • @TheSeanzeppelin
    @TheSeanzeppelin 6 лет назад +2

    Mark - great tutorial and this has helped me do what I needed immensely. Many thanks... keep it up :)

  • @tracydrew3355
    @tracydrew3355 6 лет назад +1

    Thanks for the great tutorial and the js files, they work excellent!!!! Appreciate it.

  • @RichV7191
    @RichV7191 7 лет назад

    Great job Mark... Great video and great solutions as usual...

  • @markbassig1974
    @markbassig1974 4 года назад +1

    I have not tried this but has anyone had issues making the cascading field as a required field? I ask because the JS stops working.

    • @jonathanedabi3768
      @jonathanedabi3768 3 года назад

      Hi Mark, have you found a solution? I have the same problem.

    • @markbassig1974
      @markbassig1974 3 года назад

      @@jonathanedabi3768 Sorry no.

  • @rob899
    @rob899 8 лет назад +1

    Not sure why you have thumbs down... Great video Mark keep up the good work!

    • @MarkRackley
      @MarkRackley  8 лет назад +4

      Thanks Rob, I have some "fans" that like to throw up a lot of dislikes whenever I post a video... no matter what I post. My guess is that there is some Web Part Company that is selling functionality similar to what I'm giving away for free and they don't like it... I mean.. I don't THINK I suck that much.

    • @rob899
      @rob899 8 лет назад +1

      Haha - You shouldn't! These videos are great and accurate. Thanks Mark!

  • @juandapalomera
    @juandapalomera 5 лет назад +1

    Is it possible to use the same field in the main list to filter more than one fields?

  • @AlvinRyellPrada
    @AlvinRyellPrada 3 года назад

    This is awesome
    For sharepoint 2021... This is the same stuff we do?

  • @jasonfortenbacher4991
    @jasonfortenbacher4991 4 года назад

    This has been aggravating me for weeks. I followed your tutorial step-by-step and it worked great. I tried applying this to a list I have for work and it is an unending nightmare. I've correlated content in my new form/lists with with was done in your example. But I keep getting an error that says
    error retrieving information from list: (child list name){"error":{"code":"-1,
    Microsoft.SharePoint.SPException","message":{"lang":"en-US","
    value":"The field or property '(my parent field in child list column name)."}}}

  • @aaronphillips3271
    @aaronphillips3271 7 лет назад

    If anybody has the problem of the request data returning from the rest call but the result not being output to the child drop down list: try changing the "firstOptionText" to something that doesn't have "" in it. I found that this was confusing the html on the page and once removed everything worked fine!
    Hopefully this will save someone some debugging time.
    Thanks for the resource, Mark.

  • @LanreOgun
    @LanreOgun 7 лет назад +1

    Amazing... so simple. thank you for this it is a life saver

  • @leslieroze1031
    @leslieroze1031 5 лет назад

    And it works for libraries ! Thank you so much !

  • @renetmannetje7073
    @renetmannetje7073 6 лет назад

    Great script Mark, thanks for this !!!

  • @mr.t3237
    @mr.t3237 3 года назад

    Got it working except if there are more than 100 items on a dropdown it will only show 100

  • @mehulbhadra111
    @mehulbhadra111 Год назад

    Hi Mark, its working properly for me but while doing quick edit it does not work on my List view. Can you please suggest?

  • @rogerrodriguez6252
    @rogerrodriguez6252 7 лет назад

    Mark, Thanks a lot for your detailed explanation on Cascading Dropdowns. Really appreciate it. I succeeded creating a random Cascading dropdown list, however, I am now trying to do the same with a Document Library. The plan is to be able to upload files and then categorize these files on categories and sub-categories, limiting the sub-categories option upon the category option that was selected. Do I have to make any modifications to your the .js code you uploaded to github? Thanks!!!!

    • @MarkRackley
      @MarkRackley  7 лет назад

      It should work the same for document libraries. Let me know if you run into any issues. Good luck!

    • @rogerrodriguez6252
      @rogerrodriguez6252 7 лет назад

      Hi Mark, thanks a lot for your response. I tried several times to get the document library to work. I created a list using your cascading dropdowns parameters and following the instructions on your video, and I could get it to filter up the dropdowns of the counties and cities based on the State selection. Then I replicated this with the same JS code, same lookup lists but using a Document Library... but it didn't work. Not sure What I'm missing, one difference I found between the lists and the Document library is that when I try to add a document to the Doc Library it asks first to select the document to upload, it takes a few seconds to upload and then it asks me for the State/County/City, while in the case of the list it asks for the information at first.
      I know that the DocLibrary is not getting any of the JS code because at the time of selecting the parameters the initial value is "None" instead of "Select City" or "Select County" as specified on the JS code. Not sure what do in here, any help is much appreciated. Have a good day =).

  • @restylizabautista3630
    @restylizabautista3630 5 лет назад +1

    Almost got it! I am receiving an error that the field 'State' does not exist. Can you please advise? Thank you.

  • @dominikbartschi1707
    @dominikbartschi1707 7 лет назад +1

    Thank you mark, this is awesome!

  • @frankradewagen3488
    @frankradewagen3488 7 лет назад +1

    Hi Mark, this is absolutely awesome. There are many approaches out there, tackling the Cascaded Dropdown Issue, but none is as smart as yours. Same goes for "Who needs a Data View Webpart" , which was a great help for me some years ago. Thanks for these ingenious tipps and looking forward to seeing more to come. Immediately subscribed to your channel :-) PS: When scrolling through your library in the video, I spotted "Breadcrumb". Do you have a solution for this beloved feature of SP2010?

  • @msmenne17
    @msmenne17 7 лет назад

    Great video and great solution!! I'm using your previous script for a project sprint (parent)/ project name (child) cascading dropdown in a project task list. Unfortunately, every time I edit the Task, the Project Sprint value stays the same, but the Project Name value defaults to the first item in the list rather than retaining the correct value. Will the updated version of this help?

  • @pallavimisal7748
    @pallavimisal7748 4 года назад

    Hello Mark, The tutorial is indeed helpful, but i didn't work for me. There is no error which is getting displayed but when we have to add new item the County and city dropbox don't get populated.

  • @Briarxbeauty
    @Briarxbeauty 7 лет назад

    Hi Mark, Thank you for posting this great tutorial. This has really helped me out alot. I have one question. I've added the .js file to default edit form so, it can keep the cascading drop down on the edit form but, it's doesn't work after I close the edit form and reopen. Can you please give me some direction on how to correct the issue... Thanks!

  • @TheSeanzeppelin
    @TheSeanzeppelin 6 лет назад

    Hi Mark, wondered if I could seek your help? I just wondered, i've included another drop down and it's working fine... however, I wondered how I could tweak the script so it just displays the default value of the 4th drop down once I've defined the 3rd dropdown value... at the moment it's just displaying the firstOptionText:, wondered if I could get it to show the linked value?For example:Level 1 = SomethingSelectedLevel 2 = SomethingElseSelectedLevel 3 = LastThingSelectedLevel 4 = Display the value automaitcally linked to Level 3

  • @robertogarcia5028
    @robertogarcia5028 8 лет назад

    Hey Mark.. favor, where your able to find out how to order the icons based on the column "Order" in your video? as i mentioned to you in you change the numbers in this column when you display the icons again it gives the same order and not the new order based on the column order. Once again thanks and please have a great day/week.

  • @Al.sabea.mustafa
    @Al.sabea.mustafa 7 лет назад +1

    you save my live with this trick,thanks alot

  • @clivebrandon9504
    @clivebrandon9504 6 лет назад

    Only the first drop down fields is saved, the rest are not saved in the SharePoint list item - what am I doing wrong?

  • @rosamondphilbin849
    @rosamondphilbin849 5 лет назад

    OK I have this working, now I have 2 sections of my list that needs the cascading functionality. Different arrays of information and I cannot get this to work. any ideas?

  • @pvestal
    @pvestal 7 лет назад

    Thanks for sharing, your videos are great. Keep it up.

  • @ttaylor272
    @ttaylor272 7 лет назад +1

    hello Mark. I am trying to lookup a person or Name field. Can I lookup a Names field with modifying the list the way you have and adding the items to the title field?

    • @MarkRackley
      @MarkRackley  7 лет назад

      You would need to modify the REST query to do an expand on the person field so that you could properly display the name. Not too difficult to do, but the solution is not coded to handle this scenario.

  • @toddpalermo6993
    @toddpalermo6993 6 лет назад

    Hi Mark, I am using SP Foundation 2013 and I have an error when I try to use the HillbillyCascadeCEWP.js file in the Content Editor of my form. The error is: tags are not supported in the HTML specified in either the Content property or the Content Link property. You can remove the tag, or use the Page Viewer Web Part, which supports the HTML tag. The Content property can be modified in the Rich Text Editor or Source Editor. More about the Page Viewer Web Part. Any help would be greatly appreciated!

    • @fogartym77
      @fogartym77 6 лет назад

      Todd - did you work out what this was? I am using SP Online and am hitting the same thing.

    • @toddpalermo6993
      @toddpalermo6993 6 лет назад +1

      @@fogartym77 sorry, no answer to this yet.

  • @joshuajepsen5175
    @joshuajepsen5175 5 лет назад

    Been working on this for the past few days with no success. I was able to create the state/county/city in the example, but when I tried to create my own topics, i continue to get an error message for the 2nd tier saying the columns are not valid from the list selected. I am 100% sure the columns listed are valid from the identified list.

    • @ttsassy
      @ttsassy 5 лет назад

      Joshua Jepsen I have the same problem. Did you find a solution?

  • @Agileet
    @Agileet 6 лет назад

    I agonized over getting this working all morning. Turns out, if the lookup field in the child list has a space in it, it will break. The workaround is in the params for parentFieldInChildList, you need to put '_x0020_' in place of a space. Also the childLookupField needed to be set to 'Title' despite the column being named otherwise.
    Not sure if this is still being updated - but one suggestion I have is to add in an optional parameter to add a limit on the number of list items the ajax call will pull. The current limit is defaulted to 100.
    I hope this helps somebody else struggling to get this work! Otherwise thanks for sharing this great solution.

    • @weeblesue
      @weeblesue 6 лет назад

      Thank you - I was struggling with it. Good point of using ChildLookupField as Title. I'm still struggling because my ParentFieldInChildList is "category" and i'm getting an error that the column doesn't exist. It has only 2 columns - Title and Category. I don't understand why it can't find the 2nd column. :(

  • @jasonroutledge3206
    @jasonroutledge3206 6 лет назад

    Hi Mark, I can get the script working with the lists in same site but I'm trying to pull the list from a parent site list and it can't seem to find the parent column. I've modified the _spPageContextInfo.webAbsoluteUrl to point directly to the parent site and I've created site columns on the parent site including the parent and child lists. I thought because the list was creating the column name RSC:District it would work but I am getting an expression error when I use the semi-colon in CEWP.js. Thoughts?

    • @MarkRackley
      @MarkRackley  6 лет назад

      What does your REST query look like?

  • @weeblesue
    @weeblesue 6 лет назад

    What if the items that I want to show in my dropdown lists are already columns in another list? I want to use List1-Column4 like your "Company name" list, and List1-Column5 for the "Employee" list. I don't want to have to update 3 lists when I update my main table. What do you suggest in this case?
    By the way, each Column in my list can have multiple entries, meaning Company1 Company2 Company2 Company1 exist as entries in my List1-Column4. Is there any way to remove duplicates from the list so only one entry per "Company" shows? Thanks.

    • @weeblesue
      @weeblesue 6 лет назад +1

      The reason I want to use existing columns is because when I update the information in the lists, I do not want to have to update three lists. I'd like to use the information in only ONE location. Thanks.

  • @jeomaishier
    @jeomaishier 5 лет назад

    Hello, just wondering. I want both fields to be required, but can't manage to do it in SharePoint designer. What can you suggest for it?

  • @moodyoldblue83
    @moodyoldblue83 7 лет назад

    Thank you. Great job and very informative.

  • @MrSihill
    @MrSihill 7 лет назад

    Great video, thanks Mark. I have the cascading dropdowns working however I only want to use a single cascade. I have edited the original script but keep getting the following error message - Error retrieving information from list: Cities{"error":{"code":"-1, System.ArgumentException","message":{"lang":"en-US","value":"List 'Cities' does not exist at site with URL 'someurl'."}}}
    I removed the second section of the script which refers to Cities so am not sure why this error is appearing. Any help would be greatly appreciated.

    • @MrSihill
      @MrSihill 7 лет назад

      Just to say I managed to fix it. The form was still looking at an old version of the script. I just need to get this working on an image library now.

  • @robertalarson36
    @robertalarson36 7 лет назад

    Hello I am not a developer and know very little about Jquery or SharePoint however I am trying to implement the cascading dropdown list. I have made it all the way to testing the link ../../SiteAssets/HillbillyCascadeCEWP.js in the content editor. But I cannot get past here. I click test link and get an error message
    Script:
    C:\User\z304679\AppData\Local\Microsoft\Windows\Temporary internet files\content.IE5\IFI02FOW\HillbillyCascadeCEWP.js
    Line: 1
    Char: 2
    Error Syntex
    Code: 800A03EA
    Source: Microsoft Jscript Compilation error
    Can you help?

  • @yahuahisgod
    @yahuahisgod 6 лет назад

    Stupid newbie question. When you created the individual lists, does the 2nd column need to be a lookup field? Example, in your vid you created 3 lists, States, Counties and Cities. In the Counties and Cities lists, you have a second column, is that a lookup field? I know you need them in the Cascade list but do you need them in the individual lists as well?

    • @yahuahisgod
      @yahuahisgod 6 лет назад

      Made then lookup lists and still getting same error. Error retrieving information from list: Location{"error":{"code":"-1, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The field or property 'Division' does not exist."}}}
      And yes Division is a field in my Location list. Any help? Please?

  • @MrR5000
    @MrR5000 6 лет назад

    HI everyone, hi Mark. Thanks for the vide tuttorial. I've found this being a great tuttorial and followed it step by step. Everything looks fine up to the point I STOP Edditing. when I am adding a new WEb part, type in the path and click OK, the cascading works as it should, but as soon as I click stop edditing, the cascading dissapears. Any help would be appreciated.

    • @MarkRackley
      @MarkRackley  6 лет назад

      Hmmm.. what version of SharePoint are you using? Open up your developer tools and look at the console and tell me if it's throwing any errors?

    • @MrR5000
      @MrR5000 6 лет назад

      I am using the
      free version of SP2013. I don't think I’ve got the developers tools activated.
      It is whatever the company has provided me with unfortunately.

    • @MarkRackley
      @MarkRackley  6 лет назад +1

      @@MrR5000 I've seen that behavior before on Wiki Pages, but not on forms like this. Are you using the default SharePoint Form or did you create a different form? Try the default forms if you did. Without the developer tools console in your browser I can't tell if you are getting any errors or not.

    • @MrR5000
      @MrR5000 6 лет назад

      I've managed to fix it. I've added an error warning to your script in the beginning
      and the end of the CEWP.js file, to see if the script was running at all and if
      yes then at what point in time. It turns out that I had to turn off the
      "Minimal Download strategy" and add "setTimeout(ExecuteCode,
      500);" at the end of your script. It worked like charm. Thanks you sooooo
      much for your video and the help.

    • @abiyulogaw9579
      @abiyulogaw9579 6 лет назад

      @@MrR5000 I faced the same issue. Can you show me how you fix it or share the code, pls?

  • @WoTpro
    @WoTpro 6 лет назад

    Would it be possible to do something similiar with Managed Meta data instead of lists ?

  • @adrn005
    @adrn005 6 лет назад

    Hi, will this work on just a normal list view, not just a "new" item? Anything you can do to help me out with getting it on my list view would be amazing!!!

    • @MarkRackley
      @MarkRackley  6 лет назад

      It will only work on default SharePoint classic forms. It could POTENTIALLY be tweaked to work on classic quick edit views, but I've not tried.

  • @phenixenergy1044
    @phenixenergy1044 6 лет назад

    I'm new to 365, where is the "Site Assets" directory?

  • @jpedrosant_
    @jpedrosant_ 7 лет назад

    Hello, i need to create a cascade dropdown code.
    But i have a problem, the limit of exibithion is 5000, and i have 20k items, my admin says that he will not expand the limit.
    U can help me?
    is a "challenge"..

    • @riccardoamadi8586
      @riccardoamadi8586 6 лет назад

      How can you think at a dropdown with 20k elements?

  • @msayeed78
    @msayeed78 5 лет назад

    Thank you. Great script.

  • @vishalkuppili9751
    @vishalkuppili9751 7 лет назад

    Hey Mark, i tried replicating your code for my requirements but i end up getting an nvalidClientQueryException. Do you have any idea why that could happen. Absolute novice at SharePoint here.

    • @vishalkuppili9751
      @vishalkuppili9751 7 лет назад

      Error retrieving information from list: Source{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The expression \"Id,Title,Sub-Market/Id\" is not valid."}}

  • @erickd5052
    @erickd5052 5 лет назад

    thank you very much for your videos!

  • @dianaprause
    @dianaprause 5 лет назад

    I can get this to work by itself and the tabbed form to work by itself. I've not had success combining the two scripts into a single script that creates a tabbed form with cascading drop-downs. But I'm not a code or SP guru like you.

  • @conner9815
    @conner9815 7 лет назад

    How can I get SharePoint 2013 to let me add all your files to my SiteAssets folder? .gitxxxxx files are blocked so I can't use any of your forms.

    • @MarkRackley
      @MarkRackley  7 лет назад

      You don't need to add any of the git files, those are only needed by GitHub

  • @ray-jaygenova7183
    @ray-jaygenova7183 4 года назад

    Actually, this is very helpful I used this script and it works. But when I go to 'Edit Page' there is an error
    "Sorry, something went wrong". So I can't manipulate or even add a new script. Then I run the script on VSCODE and I surprised that the script has a error;
    First error: Unexpected token '

  • @clarksteveb
    @clarksteveb 4 года назад

    Where is a Stratus Forms example of a Cascading Dropdown?

  • @stevebernard6386
    @stevebernard6386 7 лет назад

    Does this solution work in SP2013? I have implemented the solution exactly and have not been successful.

    • @MarkRackley
      @MarkRackley  7 лет назад

      it absolutely works in 2013. I use it all the time. It does not work on Modern forms though. Look at your debugger to see if it's throwing any errors and make sure all of your script references are accurate as well as list names and field names.

  • @weeblesue
    @weeblesue 6 лет назад

    This does not work for me. My parent list (Categories) has only one column, Title. My child list (Process Apps) has only two columns: Title and AppCat. (I have changed the name of the 2nd column and the error is the same no matter what I call it). My CEWP file has:
    cascadeArray.push({
    parentFormField: "Category-LU", //Display name on form of field from parent list
    childList: "Process Apps", //List name of child list
    childLookupField: "Title", //Internal field name in Child List used in lookup
    childFormField: "ProcessTitleLU", //Display name on form of the child field
    parentFieldInChildList: "AppCat", //Internal field name in Child List of the parent field
    And when I run it, i get the following error:
    Error retrieving information from list: Process Apps{"error":{code:"-1,Microsoft.SharePoint.SPException",message":{lang":"en-US","value":"The field or property 'AppCat' does not exist."}}}
    When I change the name of the column, the error repeats the changed name. So I know the code is working.
    Why am I getting this error? Is there some hidden "internal field name" that I need to go find or something? Why isn't it the name that I have given it? Is there something special I need to do with this column in my child list?
    Thank you, Susan

    • @MarkRackley
      @MarkRackley  6 лет назад

      You need to be using the Internal Field Names of your fields, NOT the Display Names. Changing the display name in List Settings does not change the internal name. The error you are getting is correct. You don't have a field with an Internal Name of AppCat. To find the fields internal name, click on the name of the field in List Settings and then look at the end of the query string on the page that's loaded. You see something like "field=xxxxx" that xxxxx is the Internal Name.

    • @jmartin0882
      @jmartin0882 6 лет назад

      Make sure the second column in your child list is a lookup column. I was having this same problem earlier and that fixed it for me.

  • @kavya06sri
    @kavya06sri 7 лет назад

    Can we have 5 level of cascading using the same approach?

  • @MrMantosius
    @MrMantosius 7 лет назад

    is it possible to use last value lookup as a multiple choice?

    • @MarkRackley
      @MarkRackley  7 лет назад

      it's possible, but not with the code as is.. it would require some customizing

  • @phy_lis
    @phy_lis 6 лет назад

    Hi Mark,
    This is a great tutorial. I managed to get mine done by following the steps given. However, I have a questions:
    How can I remove duplicates in ‘City’ drop down?

  • @rvargasc2
    @rvargasc2 6 лет назад

    HI Mark, first of all thanks for sharing this solution with all of us.
    I´m facing a issue when I try to use your code with my fields with only 1 cascading drop down. I´m not getting any error but the child field is not returning any value except the firstOption value.
    This is my scrip
    parentFormField: "Location", //Display name on form of field from parent list
    childList: "Location_List", //List name of child list
    childLookupField: "Title", //Internal field name in Child List used in lookup
    childFormField: "Sub_location", //Display name on form of the child field
    parentFieldInChildList: "Location", //Internal field name in Child List of the parent field
    firstOptionText: "Select Sub location"
    I have a my parent list called "Location_List" with the fields of Location and Sub_location. Any help?

    • @MarkRackley
      @MarkRackley  6 лет назад

      The only thing I can think of is to verify the display name and internal field names. Make sure there are no weird characters in there. Also, look at your web console and see if it's throwing any errors. nothing is obviously wrong.

    • @rvargasc2
      @rvargasc2 6 лет назад

      @@MarkRackley it worked, thanks a lot!

  • @clarksteveb
    @clarksteveb 4 года назад +1

    I downloaded HillbillyTemplate/HillbillyCascadeCEWP.js from GitHub, but it has "MY COOL TASK FORM" in it, and not the States, Counties, Cities example that is shown in the video. Can you please post the code for the video, so I can learn how to make this work. Thanks. Update: You have to go to HillbillyCascade, which is not an option from your profile page. I had to get there from a Google search. (github.com/mrackley/HillbillyCascade)

  • @miwell_
    @miwell_ 5 лет назад

    Thanks a lot men. You have my Like