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

Filter Combo box based on another column

I have the following SharePoint List:

 

ID   Title                 Area

1     12-ABC-456    Location 1

2     23-ABC-567    Location 2

3     12-XYZ-456    Location 3

 

Within Power Apps, I have an 'Area' combo box that I want to populate if the 'Title' contains 'ABC'. Therefore, my 'Area' combo box should only contain 'Location 1' and 'Location 2'. How do I achieve this?

4 REPLIES 4
RandyHayes
Super User
Super User

@rbu73 

The item property of your combobox would be:

  Filter(yourList, "ABC" in Title)

 

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!
rbu73
Frequent Visitor

Thanks @RandyHayes but I'm still having an issue, I should have mentioned my 'Area' field is a 'Choice' field. I've changed the Item property to:

Filter([@myList].Area, "ABC" in [@myList].Title)

I've also tried:

Filter(Choices([@myList].Area), "ABC" in [@myList].Title)

However, neither has worked. If I try the following I get a syntax error:

Filter(myList.Area, "ABC" in Title)

Similarly, I get a syntax error for:

Filter(Choices([@myList].Area), "ABC" in Title)

Any further help would be appreciated.

EricaBao
Community Support
Community Support

You can refer this thread, which has a solution for the same requirement

Solved: How to filter choices() on Combobox - Power Platform Community (microsoft.com)

@rbu73 

Yes, but you are not filtering the Area column.  You said you wanted only the Area choices where the Title contains ABC.  It is the Title that you are filtering.

 

So then the formula would be:

    Distinct(Filter(yourList, "ABC" in Title), Area.Value)

 

This will give you the distinct list (table with a single result column) of the Area values from the records that have ABC in the title.

_____________________________________________________________________________________
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!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,378)