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

Need a simple search button

Hello!!

 

Could someone tell me how to create a search button that will display rows in the apps where (column) = Yes?

 

Thanks!!

2 ACCEPTED SOLUTIONS

Accepted Solutions
PowerApps Staff rgruian
PowerApps Staff

Re: Need a simple search button

 

This will let you toggle the filtering on and off when you press the 'Sites Migrated' button:

 

    'Sites Migrated'.OnSelect = UpdateContext( { Filtered: Not(Filtered) } )

    gallery123.Items = If(Filtered, Filter(datasource, column = "Yes"), datasource)

 

If you want the operation to be "one way" (i.e. once you apply the filter it sticks forever), then do this instead:

 

    'Sites Migrated'.OnSelect = UpdateContext( { Filtered: true } )

    gallery123.Items = If(Filtered, Filter(datasource, column = "Yes"), datasource)

 

I hope this helps.

 

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

Anonymous
Not applicable

Re: Need a simple search button

This concept worked perfectly! Thank you!

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Need a simple search button

Hi Lp939,

 

I have achieved you requirement using the formula below:

 

Set the Items property of the target gallery to:

 

If(IsBlank(TextSearchBox1.Text), DataSource, Search(Search(DataSource, TextSearchBox1.Text, "Column1","Column2","Column3"), "Yes", "Column3"))

 

Note:

TextSearchBox1 is the name of the search box.

DataSource is the name of your data source.

Column3 contains the value of Yes.

 

Please have a try and let me know the result.

 

Regards,

Mona Li

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Need a simple search button

Thank you, but what I need on the browse screen is a button that, when clicked, will filter the results to only show content where a specific column = Yes. I do not want to use a text box to search.

 

Thanks,

 

 Lawrence

 

Powerapps.jpg

 

 

PowerApps Staff rgruian
PowerApps Staff

Re: Need a simple search button

 

This will let you toggle the filtering on and off when you press the 'Sites Migrated' button:

 

    'Sites Migrated'.OnSelect = UpdateContext( { Filtered: Not(Filtered) } )

    gallery123.Items = If(Filtered, Filter(datasource, column = "Yes"), datasource)

 

If you want the operation to be "one way" (i.e. once you apply the filter it sticks forever), then do this instead:

 

    'Sites Migrated'.OnSelect = UpdateContext( { Filtered: true } )

    gallery123.Items = If(Filtered, Filter(datasource, column = "Yes"), datasource)

 

I hope this helps.

 

Radu Gruian [MSFT] ** PowerApps Staff

View solution in original post

Anonymous
Not applicable

Re: Need a simple search button

This concept worked perfectly! Thank you!

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 489 members 5,342 guests
Please welcome our newest community members: