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

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

 

 

0 REPLIES 0

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (36,146)