cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BJ94
Resolver I
Resolver I

cascading dropdown

Hi All, 

I have two dropdown and in 1st dropdown I have taken Order No., Status, and Material name. So on the basis of 1st dropdown in 2nd dropdown need to show the values. Like when selected 1st dropdown as status then in 2nd dropdown need to show approved, rejected, hold options. 

 

How can we do this?

Please give suggestions.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @BJ94,

Have you resolved your problem?

 

I understand what @TheRobRush is confused of😂, for us, any unresolved issue needs details as many as you could provide.

Anyway, I just want to confirm with you that if you populate the first dropdown with all the column names, and once you select one column, the second dropdown should display the corresponding values within?

If so, you should tell us how we could fetch each column values from your list, 'Order No.', Status, 'Material Name'... All these columns has different methods to fetch the value within based on their different column types.

 

If all of them are single-line-of-text, you should set the Items property of the second dropdown as below:

Switch(
     Dropdown1.Selected.Value,
     'Order No.', List1.'Order No.',
     Status, List1.Status,
     'Material Name', List1.'Material Name'
)

If there is Choice type or other type, you should replace the List1.Status as Choices(List1.Status)

Best Regards,
Qi

View solution in original post

10 REPLIES 10
TheRobRush
Super User
Super User

To get an idea how this works, create the following then play around with it to get a better understanding of the formulas.

 

Make one Dropdown (Dropdown1 in this example), and set it's items to

[1,2,3,4,5,6,7,8,9,10]

Now create a 2nd dropdown (Dropdown2) and set it's items to 

Switch(
     Dropdown1.Selected.Value,
     1, ["A","B","C"],
     2, ["D","E","F"],
     3, ["G","H","I"],
     4, ["J","K","L"],
     5, ["M","N","O"],
     6, ["P","Q","R"],
     7, ["S","T","U"],
     8, ["V","W","X"],
     9, ["Y","Z","AA"],
     ["AB","AC","AD"]
)

 

Now you have a working example of two dropdowns where the second chanegs based on the first

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Hi @TheRobRush 

There is lot of data in second dropdown in order no. and materials.

Is there any other way to add data in second dropdown.

 

Thanks!

TheRobRush
Super User
Super User

I do not understand what you are asking

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
TheRobRush
Super User
Super User

What is the source of first dropdown, and where is data you want in second stored

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Hi @TheRobRush 

 

This solution is not working. 

 

Thanks!

First dropdown data is column name from database and second dropdown data i.e Order no. (like 211025, 211045) is stored under column name(Order No.)

 

And order nos. are around to 2000 and all. 

only status is like approved, rejected, on-going, hold.

 

TheRobRush
Super User
Super User

Will need to see the structure of both lists, because need to know what to reference that matches etc.

or is it all one splist

with first dropdown the column called name in this list

and the second dropdown should include every records order number value when the name column is the name on the dropdown 1

 

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Yes , column name is order number and which is first dropdown. And in second dropdown data saved in column - Order no.,  That we need display.,

TheRobRush
Super User
Super User

Again, will need column info. Vheck your SharePoint list settings for each of these columns and let us know what types the columns are 🙂

 

Also, you typed column 1 is named order number and column 2 is named order no?

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,508)