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

Filter data displayed in Browse Gallery.

I am trying to create a Timesheet app using Excel in OneDrive for Business as a data source and target.  I created the app using the Employees table as the initial data source. PowerApps automatically created BrowseScreen1 which lists all Employees. It has a text search on Employee_Name so users can find themselves and then tap NextArrow1 to go to DetailScreen1.

I only want to include active employees in the browse gallery, i.e. select * from Employees where Active_Ind = 'TRUE'. 

BrowseGallery1 currently has Items defined as

 

SortByColumns(Search([@Employees], TextSearchBox1.Text, "Employee_Name"), If(SortDescending1, Descending))

 

How can I filter the records listed in the browse gallery to only include active employees? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Filter data displayed in Browse Gallery.

@yashag2255 that didn't quite work but I've figured out a way to get it done. 

I changed the Active_Ind values in the Excel sheet to 1 for true, 0 for false and formatted as a number.  My formula now looks like this: 

SortByColumns(Filter(Search([@Employees], TextSearchBox1.Text, "Employee_Name"),Active_Ind=1), If(SortDescending1, Descending))

I wish I knew why it didn't work before; it could be that having a value of TRUE confuses powerapps in some way. 

Thanks for your help.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User III
Dual Super User III

Re: Filter data displayed in Browse Gallery.

Hi @spow5666 

 

You can update the expression as:

SortByColumns(Search(Filter([@Employees],Active_Ind = 'TRUE'), TextSearchBox1.Text, "Employee_Name"), If(SortDescending1, Descending))

I am assuming that Active_Ind is a text type field here, if this is a boolean field, you can use:

SortByColumns(Search(Filter([@Employees],Active_Ind = true), TextSearchBox1.Text, "Employee_Name"), If(SortDescending1, Descending))

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Filter data displayed in Browse Gallery.

@yashag2255 that didn't quite work but I've figured out a way to get it done. 

I changed the Active_Ind values in the Excel sheet to 1 for true, 0 for false and formatted as a number.  My formula now looks like this: 

SortByColumns(Filter(Search([@Employees], TextSearchBox1.Text, "Employee_Name"),Active_Ind=1), If(SortDescending1, Descending))

I wish I knew why it didn't work before; it could be that having a value of TRUE confuses powerapps in some way. 

Thanks for your help.

View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,305)