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
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
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!
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!!!
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.
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)."}}}
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.
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!!!!
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 =).
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?
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?
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.
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!
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
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.
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?
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?
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.
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!
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.
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.
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. :(
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?
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.
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.
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.
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?
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?
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?
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.
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.
@@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.
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.
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!!!
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"..
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.
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."}}
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.
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 '
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.
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
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.
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?
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?
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.
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)
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
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
@@09289968476 It has to be a lookup in order to work.
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!
great tutorial and script Mark, best cascade option I've seen in SP yet, cheers
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!!!
Great Video Mark. Many thanks for taking the time and uploading this gem.
Absolutely wonderful! I am inspired to learn Java scripting. It was so easy to understand the way you explained. Thank you.
Mark, you are awesome! Thanks for sharing your solutions. I've reviewed several of them and they are all great.
Can't find words on how You helped me. Thank you.
Thank you Mark for this perfect tutorial.
Mark - great tutorial and this has helped me do what I needed immensely. Many thanks... keep it up :)
Thanks for the great tutorial and the js files, they work excellent!!!! Appreciate it.
Great job Mark... Great video and great solutions as usual...
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.
Hi Mark, have you found a solution? I have the same problem.
@@jonathanedabi3768 Sorry no.
Not sure why you have thumbs down... Great video Mark keep up the good work!
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.
Haha - You shouldn't! These videos are great and accurate. Thanks Mark!
Is it possible to use the same field in the main list to filter more than one fields?
This is awesome
For sharepoint 2021... This is the same stuff we do?
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)."}}}
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.
Amazing... so simple. thank you for this it is a life saver
And it works for libraries ! Thank you so much !
Great script Mark, thanks for this !!!
Got it working except if there are more than 100 items on a dropdown it will only show 100
Hi Mark, its working properly for me but while doing quick edit it does not work on my List view. Can you please suggest?
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!!!!
It should work the same for document libraries. Let me know if you run into any issues. Good luck!
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 =).
Almost got it! I am receiving an error that the field 'State' does not exist. Can you please advise? Thank you.
I'm having this same issue! Help :)
Thank you mark, this is awesome!
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?
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?
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.
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!
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
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.
you save my live with this trick,thanks alot
Only the first drop down fields is saved, the rest are not saved in the SharePoint list item - what am I doing wrong?
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?
Thanks for sharing, your videos are great. Keep it up.
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?
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.
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!
Todd - did you work out what this was? I am using SP Online and am hitting the same thing.
@@fogartym77 sorry, no answer to this yet.
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.
Joshua Jepsen I have the same problem. Did you find a solution?
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.
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. :(
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?
What does your REST query look like?
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.
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.
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?
Greate script btw
Thank you. Great job and very informative.
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.
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.
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?
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?
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?
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.
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?
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.
@@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.
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.
@@MrR5000 I faced the same issue. Can you show me how you fix it or share the code, pls?
Would it be possible to do something similiar with Managed Meta data instead of lists ?
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!!!
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.
I'm new to 365, where is the "Site Assets" directory?
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"..
How can you think at a dropdown with 20k elements?
Thank you. Great script.
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.
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."}}
thank you very much for your videos!
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.
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.
You don't need to add any of the git files, those are only needed by GitHub
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 '
Where is a Stratus Forms example of a Cascading Dropdown?
Does this solution work in SP2013? I have implemented the solution exactly and have not been successful.
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.
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
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.
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.
Can we have 5 level of cascading using the same approach?
yes
is it possible to use last value lookup as a multiple choice?
it's possible, but not with the code as is.. it would require some customizing
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?
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?
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.
@@MarkRackley it worked, thanks a lot!
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)
Thanks a lot men. You have my Like