hello folks welcome back in this video you will learn how to create cascade
dropdown using SharePoint list data in PowerApps
so stay tuned and let's go to the demo after this short intro
i have a location list in sharepoint with title column
and city column the title column contains the country name
and the city column contains the city name in that country
you can have multiple records per countries as there could be more than
one city linked to that specific country i would like to
create two dropdown controls in powerapps form based on this list data
first column will show the list of countries from this sharepoint list
and the second column should only display the list of cities
in the selected country so let's see this in action i need to navigate
to office.com and from the left hand menu
i need to look for powerapps application icon
so i will select that to open the powerapps application landing page where
we can create new powerapps so from the left
hand menu i will click on create and then i will
select canvas app for this example i will give
this app a name i'm just calling it location input and
keeping it tablet format and then i will click on
create this will create a blank canvas app for
me so first i need to drop some labels and drop down
boxes here so if i click on the insert tab and
click on label twice this will create two labels for me
i will rename the labels one is country and the second one is the
city now i will add two dropdown inputs
again from the insert tab if i go under this input
i can click drop down it look great first drop down
and then i can click again this will create a second dropdown
so i will rename them as well so the drop down one
this is actually name of the country so i will rename it to
countries ddl, ddl stand for dropdown list
and then i will rename the second drop down to
cities ddl okay so i've renamed them now i want this title column
coming up as a list of countries so we have two countries
at the moment uk and germany and these are repetitive
values so we want that dropdown to only show uk value and germany
and when someone select a uk value it will only show
london manchester and glasgow as a cities if the
person select germany as a country it should display the
germany cities only so first we need to make connection to this
list so this list is hosted on a sharepoint training site
so i will navigate back to my powerapp and from the left-hand menu
i will click on this data icon and then under this drop down add data
i will search for sharepoint because we're looking to connect to sharepoint
as a data source i'll select sharepoint you can add a new connection because i
have used this PowerApps application page before to connect to
other sharepoint list so it is showing me all the previous
connections so i can use one of the existing ones so i will select that
now it is showing me all the recent sites here if you don't find your site
in the recent site you can always put the site url here
so i'll select the recent site and then the
list i'm interested in is locations list so i will select that and connect
now i have made a connection to that location list and that data source name
is locations so first we need to retrieve the list of countries so
so when i select the country drop down and on the items
i'll need to bring the countries because there are repetitive entries for each
country i want to retrieve unique country names
only and only once so for that i will use distinct so i
want to retrieve the distinct values from where from this location data
source and which column i am interested in
the column name is title because we are using this title column as a country
name so that's it so this is gonna bring all
the country names so if i just play this one
and you can see that is only bringing the two country name and
bringing the distinct values okay now the next step is when someone select one
of these countries i want this cities to be populated
accordingly so if i select uk it should only display
uk values here now for the cities i want to filter the
values for the city column based on whatever has been selected on the
country column so if i navigate and select the city column
so in the city items i will remove this drop-down sample
and instead i will say filter because i want to filter the value based on the
country selected in the first drop-down and the data
source is always going to be location because that's where we're getting the
information from so location is a shape on list
and then what is our logic so we are saying that if the title is equal to
countries tdl dot selected dot result and then close parenthesis
and hit enter so we are doing a filter on this location
where we're saying that the title is equal to
whatever is selected in this first drop down dot result
and then we if we look into right hand side it automatically selected
the value for the second column is city so
if it's not selected the appropriate column you want to retrieve for that
drop down from the sharepoint list you can select that column here
so it by default i have selected the city column
so let's test it now so if i preview this app
and now if i select germany now you can see is only
showing me the city of germany now if i select
united kingdom it is showing me all the uk cities
in the drop down only so to just wrap up this video
today you have learned how to create cascade drop down
using sharepoint list data in powerapps thank you very much for watching this
video consider subscribing if you're new to the channel by pressing the red
subscribe button below this video and click the notification bell icon so
you don't miss any of my future videos as i upload new videos
every week give this video a thumbs up if you found it useful
if you have any question regarding this topic or any other queries related
office 365 put in the comment section below i
review the comments on the daily basis so i will be happy to answer your
questions thank you