cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Reghero
Level: Powered On

Sort + Filter with Toggle and Filter Textbox

Hi guys

 

Building my first PowerApp and need some assistance please. I've checked a couple solutions on here, but couldn't get the desired outcome.

 

Basically I'm trying to filter a gallery based on the StartsWith function that a user types in (Filters on 2 fields). This works as expected with formula:

 

Filter(Agendas, StartsWith(Coordinator, FilterTextBox.Text) || StartsWith(MeetingID,FilterTextBox.Text))

 

I now have two additional filter requirements using toggles. These toggles should compare the values of yes/no columns in SharePoint and filter the gallery on the text in the textbox and on whatever the value of the toggle is. 

 

Currently my filter works only when the first toggle is set to false, when I toggle it to true, nothing returns. I'm guessing my else statement is not correct. Here is my formula:

 

If(

  Toggle1_1.Value= false,     

    Filter(Agendas,HasMeetingNr=Toggle1_1.Value,

        StartsWith(Coordinator,FilterTextBox.Text) || StartsWith(MeetingID,FilterTextBox.Text)

     ),  Filter(Agendas,!HeeftFactuurNr,

        StartsWith(Coordinator,FilterTextBox.Text) || StartsWith(MeetingID,FilterTextBox.Text)

     )

)

 

I would then need to do the same for the second toggle. 

 

Any suggestions welcome!

 

Thanks

 

 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,678)