cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Robert2
Level: Power Up

Gallery Filter

Sorry if this is a stupid question. I'm just starting to play with PowerApps and I want to only show records in my gallery that have the answer No in the column SaleRepApproved. The app created itself and gave the coding below.

 

SortByColumns(Filter('Sales Hand off', StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

I've tried editing it a bunch of different ways and no such luck

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Gallery Filter

Hi @Robert2 

 

Can you try to use the below expression to embed both the conditions if the SharePoint column is a single line text field:
 
SortByColumns(Filter('Sales Hand off', StartsWith(Title, TextSearchBox1.Text) && SaleRepApproved = "No"), "Title", If(SortDescending1, Descending, Ascending))
 
If this field is a Yes/No type sharepoint column then you can try out the below expression:
SortByColumns(Filter('Sales Hand off', StartsWith(Title, TextSearchBox1.Text) && SaleRepApproved = "false"), "Title", If(SortDescending1, Descending, Ascending))
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!

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Gallery Filter

Hi @Robert2 

Assuming that SaleRepApproved is a text field, the following modification should work:

 

SortByColumns(Filter('Sales Hand off', SaleRepApproved="No"), 
"Title",
If(SortDescending1, Descending, Ascending)
)
Dual Super User
Dual Super User

Re: Gallery Filter

Hi @Robert2 

 

Can you try to use the below expression to embed both the conditions if the SharePoint column is a single line text field:
 
SortByColumns(Filter('Sales Hand off', StartsWith(Title, TextSearchBox1.Text) && SaleRepApproved = "No"), "Title", If(SortDescending1, Descending, Ascending))
 
If this field is a Yes/No type sharepoint column then you can try out the below expression:
SortByColumns(Filter('Sales Hand off', StartsWith(Title, TextSearchBox1.Text) && SaleRepApproved = "false"), "Title", If(SortDescending1, Descending, Ascending))
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!

View solution in original post

Robert2
Level: Power Up

Re: Gallery Filter

That worked perfectly!

 

It was a yes/no field. I pasted that into the fx bar and it did exactly what I was hoping for.

 

Thank you.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,825)