cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filtering dropdown choices based on another droppdown selected value

Hi all,

 

I'm completely new to PowerApps and I got stuck on dropdown issue. The thing is - I have a form that is connected to a Sharepoint list. There are several dropdowns but the first dropdown (System) with choices (OKbase, PowerKey, Money S3) needs to filter choices in another dropdown (Role).

The Role dropdown has following choices by default:

 

Work Equipment
Team Leader
Manager (Salaries)
HR
HR + Salaries
Administrator

Line Manager

 

What I aim for is to have following Role choices if OKbase is selected in System dropdown:

 

Work Equipment
Team Leader
Manager (Salaries)
HR
HR + Salaries
Administrator

 

And below Role choices if PowerKey System is selected:

 

Line Manager
HR

 

I'd really appreciate any help, thanks!

7 REPLIES 7
dinusc
Microsoft
Microsoft

You will have to define the relationship between those values (which Roles belong to which System). For example, you could have another SharePoint list with a text column and a choice column. An example of entry in that list would be: Text="Power Key", Choices=Line Manager, HR. This tells that the Power Key has 2 values (according to your example).

This way the app will know what choices belong to what value.

After having that table, You could have the "System" ComboBox populated as you already have and then use "Filter" function to populate the "Roles" ComboBox (see this page for more details: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup).

Hope this helps.

Hey @Anonymous I got you covered with this video on PowerApps Cascading DropdownsSmiley Very Happy

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Anonymous
Not applicable

Hi there @Shanescows!

 

Thanks for the video, it helped me get the dropdown choices filtered, however, another problem came up. Here's the thing: I created another Sharepoint list to create the relation between System and Role to be able to filter it out, but now when I try to save and submit the form it does not work (No error whatsoever, it just doesn't do anything other than the floating dots above the form). I assume there might be problem with the Role taking its values from another list, because when I leave the Role out blank it works fine.

 

Have you got any idea how to fix this?

 

Thanks in advance! 

Saving related fields should be handled automatically, if the relationship is defined between the 2 lists. Please see the following page where the saving is eplained in details: http://powerappspros.com/2017/05/powerapps-pro-tips-patching-sharepoint-lists/

@Anonymous LOL. I should start sharing these videos together. Now you need this video. PowerApps SharePoint LookUp Columns it will take you that final mile. 🙂 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
ARTHUR_PETRO98
New Member

Hi for all!

MY SOLUTION USING LISTS:

 

If(Text(DataCardValue17.Selected.Value) = "USA";["TEXAS";"OREGON"];If(Text(DataCardValue17.Selected.Value) = "Brazil";["AMAZONAS";"BAHIA"]))

 

Anotação 2022-03-09 120510.png

Hi @Shanescows I got all the way to time 7:55 in your video and the problem I'm having is, I only have "Result" as an option. I'm missing the "Value" option. Rather than using excel as a data source I'm using one sharepoint list with two columns. Any idea why I don't have the "Value" option?

First dropdown:
Sort(Distinct(Filter('Customer Census (View Only)', Active="Yes"), BU), Result)

 

Second that is broken:
Filter('Customer Census (View Only)', BU=MB.Selected.value)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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