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

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
Highlighted
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
Lp939
Level: Powered On

Re: Need a simple search button

This concept worked perfectly! Thank you!

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.
Lp939
Level: Powered On

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

 

 

Highlighted
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
Lp939
Level: Powered On

Re: Need a simple search button

This concept worked perfectly! Thank you!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 260 members 4,343 guests
Please welcome our newest community members: