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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,065)