cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PAB
Advocate III
Advocate III

Multiple Filters for Browse Screen

Hi,

 

I just started creating a new App and I want to change the default Browse Screen1 so that I can have multiple filters on this column that consist of dropdowns and not an open text field. How do I incorporate all the columns I want to filter by and what is the formula to have them all filter together?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
hpkeong
Community Champion
Community Champion

Hi @PAB

 

In fact, they are repeating questions on this part and you can search in the forum and I have posted before.

Anyway, you are right that PA sample provides Text Search by default and this is common.

 

But app maker like us make wish to have multiple search or filter functions.

 

So, please have this conditions in your mind and you can play with it anytime.

Example:

- You have a datasource called Table1

- You have a gallery

- You want to fileter by: Dropdown, ListBox or even Text Field (Label)

 

1. OnScreen,Visible = ClearCollect(Anyname, Table1) This means it will collect your Table1 data into a collection called Anyname

2. Set the Gallery.Items = Anyname - This will populate your gallery with data from Table1 thru Anyname

3. OK, now you have playaround with it using any method to filter.

Dropdown.Items = Distinct(Table1, Field1)

Dropdown.Onchange = ClearCollect(AnyName, Filter(Table1,  Field1 = Dropdown1.Selected.Result))

 

The same, applies to anyother filtering method

- TextInput

- ListBox

- Another Gallery,....

 

The trick is to use ClearCollect(Temporary Collection Table, based on your Filtering Results) and then populate into a Gallery or Data Table.

 

I hope this posts can help again on those who ask the same questions.

 

I hope it helps and you enjoy playing around with this.

 

TQ

hpkeong

View solution in original post

4 REPLIES 4
Fatima
Frequent Visitor

Hi PAB,

 

In the normal situation, the "items" field of the Gallery is set up to your datasource. In your situation, you can tweak that a little bit and add filter functions on the columns you would like to filter the datasource by.

 

For example, if your gallery is reading data from a sharePOint list called "Scores", then the items attribute of the gallery is set to "Scores". Thats the normal situation.

In your case, you can say, Filter(Scores, "Yes" in ScoredStatus) -- where ScoredStatus is a column in the scores table and is of type boolean.

 

Hope that helps as a starting point. If you have a specific scenrio that you would like to discuss, please post back. 

hpkeong
Community Champion
Community Champion

Hi @PAB

 

In fact, they are repeating questions on this part and you can search in the forum and I have posted before.

Anyway, you are right that PA sample provides Text Search by default and this is common.

 

But app maker like us make wish to have multiple search or filter functions.

 

So, please have this conditions in your mind and you can play with it anytime.

Example:

- You have a datasource called Table1

- You have a gallery

- You want to fileter by: Dropdown, ListBox or even Text Field (Label)

 

1. OnScreen,Visible = ClearCollect(Anyname, Table1) This means it will collect your Table1 data into a collection called Anyname

2. Set the Gallery.Items = Anyname - This will populate your gallery with data from Table1 thru Anyname

3. OK, now you have playaround with it using any method to filter.

Dropdown.Items = Distinct(Table1, Field1)

Dropdown.Onchange = ClearCollect(AnyName, Filter(Table1,  Field1 = Dropdown1.Selected.Result))

 

The same, applies to anyother filtering method

- TextInput

- ListBox

- Another Gallery,....

 

The trick is to use ClearCollect(Temporary Collection Table, based on your Filtering Results) and then populate into a Gallery or Data Table.

 

I hope this posts can help again on those who ask the same questions.

 

I hope it helps and you enjoy playing around with this.

 

TQ

hpkeong

View solution in original post

Hello

 

Why is the data source name important.. mine called Tabelle1 because of my mother language German!

hpkeong
Community Champion
Community Champion

Ok u can whatever your table name, I am only giving example.

Tq
hpkeong

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (28,914)