cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmnflom
Frequent Visitor

Conditional Filtering in the Items of a dropdown input?


I know that it's possible to filter a gallery based on a dropdown, but I wanted to know if it is possible to do the opposite as well?  

 

I have a gallery where users will go and update two columns of each row by using a dropdown.

1.png

 

My question is, can you filter what appears in the Items of each drop down based on what the selected row's "Item Type" is?

 

I was thinking of doing this by creating a collection and putting that in the Items of each dropdown - but that keeps giving me errors. How can I create conditional filtering within the dropdown Items?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@cmnflom 

Yes this can be done.  First, skip the collections and just put it in your Dropdown Items property.

 

ex. with static values:

Switch(ThisItem.ItemType, 
    "ItemA", ["Option1", "Option2", "Option3"],
    "ItemB", ["OptionY", "OptionZ"]
//...etc...
)

With Dynamic Values:

Switch(ThisItem.ItemType, 
    "ItemA", Choices([@someListA].SomeColumnA]),
    "ItemB", RenameColumns(Distinct(someListB, SomeColumnB), "Result", "Value")
    "ItemC", RenameColumns(Filter(SomeListC, SomeCriteria=SomeCriteria).SomeColumnC, "SomeColumnC", "Result")
//...etc...
)

The options are endless!!

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User III
Super User III

@cmnflom 

Yes this can be done.  First, skip the collections and just put it in your Dropdown Items property.

 

ex. with static values:

Switch(ThisItem.ItemType, 
    "ItemA", ["Option1", "Option2", "Option3"],
    "ItemB", ["OptionY", "OptionZ"]
//...etc...
)

With Dynamic Values:

Switch(ThisItem.ItemType, 
    "ItemA", Choices([@someListA].SomeColumnA]),
    "ItemB", RenameColumns(Distinct(someListB, SomeColumnB), "Result", "Value")
    "ItemC", RenameColumns(Filter(SomeListC, SomeCriteria=SomeCriteria).SomeColumnC, "SomeColumnC", "Result")
//...etc...
)

The options are endless!!

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (959)