cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Radio button filter, and Search on Gallery

I want to add radio button filter to my gallery. But dont know how to add it to Items of gallery, which already contains stuff for search.

 

Gallery Items: SortByColumns(Search([@'[dbo].[PaymentVaucher]'], TextSearchBox1.Text, "RequestedBy","AccountingApproval"), "ID", If(SortDescending1, Descending, Ascending))

 

Value for radio button that I want to add to Items of gallery: If(!IsBlank(Radio2.Selected.Value), Filter('[dbo].[PaymentVaucher]', AccountingApproval = Radio2.Selected.Value), '[dbo].[PaymentVaucher]')

 

How would I combine both together?

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@Anonymous 

You should be able to combine the two formulas like so:

SortByColumns(Search(
              If(!IsBlank(Radio2.Selected.Value), 
                 Filter('[dbo].[PaymentVaucher]', 
                        AccountingApproval = Radio2.Selected.Value), 
                 '[dbo].[PaymentVaucher]'
              ), 
              TextSearchBox1.Text, 
              "RequestedBy","AccountingApproval"), 
              "ID", 
              If(SortDescending1, Descending, Ascending)
)

View solution in original post

1 REPLY 1
timl
Super User
Super User

@Anonymous 

You should be able to combine the two formulas like so:

SortByColumns(Search(
              If(!IsBlank(Radio2.Selected.Value), 
                 Filter('[dbo].[PaymentVaucher]', 
                        AccountingApproval = Radio2.Selected.Value), 
                 '[dbo].[PaymentVaucher]'
              ), 
              TextSearchBox1.Text, 
              "RequestedBy","AccountingApproval"), 
              "ID", 
              If(SortDescending1, Descending, Ascending)
)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,709)