cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Cascading Dropdown From DIfferent SharePoint List

Hi,

 

We have developed an PowerApp based on a SharePoint list. The list is having fields like Name, ID, Score, with some Test Fields. I want to add three new fields which would contain Region, Country and Contact. There can be multiple countries in one region and multiple contacts in each country as per below. 

 

RegionCountryContact
AfricaSouth AfricaUser A
AfricaNigeria User B
AsiaKoreaUser C
AsiaKoreaUser D

 

……… and so on.

 

For the Region, Country and Contact I need the cascading dropdown for example, If user Select Africa then, in the Country only South Africa and Nigeria should appear. If Nigeria is selected then User B to be appeared.

 

What i was thinking that, i will create a different list in SharePoint and then will configure with the main list.

So i have two questions.

How can i create Cascading Dropdown from another list (as 'Country Mapping List')?

How can i add the values in to the Main list which was derived from the 'Country Mapping List'?

 

Can anyone please help with detailed steps?

 

Regards, 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Here is a small example that I set up (you will need to make some adjustments based on your lists).

 

  1. I have a SP list called Student Scores. For now, it only has 2 columns - Title and StudentUser (I will tell you the data type of this column later). I added 2 records to this table - Student 1 and Student 2 in the Title fields
  2. I have another SP list called Country Mapping List. It has 4 columns - Title, Region, Country, User. The data in this table is the same as you have outlined in your question. 
  3. The StudentUser column in Student Scores list can be a lookup to the Country Mapping List's User column. Or you can simply set this to Text if the User records in your example are text values. I am assuming
  4. In the canvas app, I added a gallery of Student Scores, just so I could see the values getting added/updated. This isn't necessary. You can always go back to the SP list to verify. 
  5. I then added 3 combo boxes with the following properties: 
    1. Region combo box Items property - Distinct('Country Mapping List',Region)
    2. Country combo box Items property - Distinct(Filter('Country Mapping List', Region = ComboBox1.Selected.Result), Country)
    3. User combo box Items property - Filter('Country Mapping List', Country = ComboBox2.Selected.Result).User

The combo boxes behave the way you would expect to. And once you have the User selected, you can simply Patch to update the Student Scores list with the selected User. 

 

Here is a small demo (I could have done it slightly better by resetting the combo boxes so the old values get cleared but hopefully this gives you an idea): 

 

SPListCountry.gif

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

2 REPLIES 2
Highlighted
Super User II
Super User II

Here is a small example that I set up (you will need to make some adjustments based on your lists).

 

  1. I have a SP list called Student Scores. For now, it only has 2 columns - Title and StudentUser (I will tell you the data type of this column later). I added 2 records to this table - Student 1 and Student 2 in the Title fields
  2. I have another SP list called Country Mapping List. It has 4 columns - Title, Region, Country, User. The data in this table is the same as you have outlined in your question. 
  3. The StudentUser column in Student Scores list can be a lookup to the Country Mapping List's User column. Or you can simply set this to Text if the User records in your example are text values. I am assuming
  4. In the canvas app, I added a gallery of Student Scores, just so I could see the values getting added/updated. This isn't necessary. You can always go back to the SP list to verify. 
  5. I then added 3 combo boxes with the following properties: 
    1. Region combo box Items property - Distinct('Country Mapping List',Region)
    2. Country combo box Items property - Distinct(Filter('Country Mapping List', Region = ComboBox1.Selected.Result), Country)
    3. User combo box Items property - Filter('Country Mapping List', Country = ComboBox2.Selected.Result).User

The combo boxes behave the way you would expect to. And once you have the User selected, you can simply Patch to update the Student Scores list with the selected User. 

 

Here is a small demo (I could have done it slightly better by resetting the combo boxes so the old values get cleared but hopefully this gives you an idea): 

 

SPListCountry.gif

Let me know if this helps. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

Highlighted

Hi @PowerAddict @Hardit,

 

I am trying the solution suggested by you and will get back on the results shortly.

 

Regards,

Akshay

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,125)