Cascading Drop-downs in SharePoint using SP Services

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
our friends this is my rate from my class book dot o-r-g today we are going to learn how we can implement a single level of cascading in SharePoint site so let's start for this tutorial we are going to take one simple example for the street and Country cascading so first of all let's create one list for our parent list here our parent list will be country and our child list will be States so let's create one parent list named country okay so let's add a couple of countries in this list one definitely it will be India although there will be us then we will now create another list which is our child list or let's create it let's add one lookup column which will take values from our parent list that is country so in this list our country will be your lookup column and we are we are taking values of countries from a country list and column is our title click ok ok so our list is created which is our child list so let's add some states so all these states represent the country India let's create another States which belongs to USA ok so we are done with our for state that is we have created our parent list and we have created our child list ok now we will create another list from in which we are taking these two lists as a drop-down so let's create another list which will be our let's say information list ok so here in the information list we are let's create two columns one is for country and another another is for state both these columns will be look up columns country will take values from country list okay keep it as it is keep it as as it is and click on OK again create another column which represents the state okay let's make it look up column it will take values from a state list and okay keep it as title because we have stored our states in title title column click on OK okay that's it we are now done with our second second state that is we have created our information list from there in which the data is coming from our two master list that is country and state so let's create a determined information list okay let's say this is a test item okay now now you can see both these countries in this drop-down but you can also see all the states from this from the state list it's showing here let's say I have chosen the India but still it is showing some states from the you assess it so we have to make it dynamic so that and they select the India it should show only the states from India so for that what we have to do we have to just add one content edit of webpart on this page so just edit this page okay then yeah let's add a content edit / part here okay just click here and edit the source so now here what we have to do is and this example we are going to use SP services and SP services there is one function that is sp cascade drop downs this function allows us or it will let let you set up the cascading dropdowns on sharepoint forms and using this function you can enforce the hierarchical relationships between column values okay so as you can see we have we here we need to load our jQuery file and we have to load our SP services file so I have given the references for both these files and we have written a simple function which will contain our with a relationship list in this case our relationship list States so here our relationship less states states then relationship or this is our child less talking so relationship list parent column so here we have to mention a parent column in our child list so in our child is the parent kala means country okay and then in the same childless the child column is definitely it is the state column but its internal name is title so then our parent column is so this parent column is of is from all the latest list that is information list so mention it as country and our child column will be staked okay so let me explain it one more time in this function we are going to use SP cascade dropdowns function there we have certain parameters so these are five parameters one is relationship list so this this is the name of our child list this will be a parent column name in child list this will be a child column name in child list this will be a parent column in our resulting list that is our information list and the same child column from our information list the name of the child column in our resulting list that is information list okay so let's copy this whole script in a content editable part click OK and just click on stop editing okay now let's create a new item okay just write something here okay okay now when see as you can see there is no any option now in the state column so when we choose India it will show the States belongs from India and when we select USA it will show only states belonging to USA then you can save that item okay now let's edit that same item okay now again the same problem you can see all the states from the state list so we also need to add the script on this page just I had a content editor web part edit the source has the same core click OK and stop editing now let's again eat it the same item just to check ok so see as you say it's selected we can only see the states belongs to USA when we select India it will show States belongs to India so this was it for this this is for a single level of cascading you can do multiple level of cascading let's say now we have to use a CT column as well so in that case what we need to do is we will just copy this function as it is here now if you add another column let's say CT then in that case our straight column will be a parent list sorry state list will be a parent list and CT list will be a child list so in that case we need to write it humor adds Ct this will be a city list we have to adhere parent column and state this will be titles as it is then this will be parent column that is state and child column will be city okay these two parameters belongs to our resulting list that is on which on the list where you want to implement the cascading and these this is a list name of our parent list okay so I hope you enjoyed this video and I hope you would like it so thanks for watching please like share and subscribe thank you
Info
Channel: Mayuresh Joshi
Views: 8,322
Rating: 4.7894735 out of 5
Keywords: Cascading Drop-downs in SharePoint using SP Services, Cascading, Drop-downs, SharePoint, SP Services, Office 365, SharePoint Online, How to, Country, State, City, CEWP, Script, JavaScript, SPCascadeDropdowns, relationshipList, Parent column, Child Column
Id: TMyrb67WXO8
Channel Id: undefined
Length: 14min 19sec (859 seconds)
Published: Sat Sep 30 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.