web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Search gallery only wh...
Power Apps
Answered

Search gallery only when button is pressed

(0) ShareShare
ReportReport
Posted on by 1,168

Hi,

 

Is it possible to search a Sharepoint list/gallery ONLY when a button is pressed.

 

Think a complex search that would require adding columns

 

This would be in addition to some simple search boxes that already exist and are all working fine.

 

Thanks in advance for any tips

 

Todd

Categories:
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    I believe the answer is "yes".  You can use your button to set a variable, if the variable is true then show your "complicated" gallery instead of the normal one... something like that could work

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Tango ,

     

    If I understand correctly, you wish to add some condition to the Items property that is triggered by keeping a button pressed. You can use the Pressed property for this:

     

    If(
     Button1.Pressed, 
     // Statement for when the button is pressed
     
     , 
     // Statement for when the button is not pressed
     
    )

     

  • Tango Profile Picture
    1,168 on at

    Thanks @BCBuizer @Rusk Is it possible to point the results to a gallery?

     

    My thinking is just on select filter(listname,Current = true)

     

    But how do I send those results to the existing gallery?

     

    Cheers

     

    Todd

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    You could add a Filter formula to your Gallery Items:

     

    If(varButton,Filter(DataSource...)  If you provide an example of your current Gallery formula, and the filtering you want to apply, I could give you a better example

  • Tango Profile Picture
    1,168 on at

    The gallery and its fields will be the same for a simple or complex search. Its just that the actual searching will be more complex and search deeper in to some other related Sharepoint lists

  • Tango Profile Picture
    1,168 on at

    Its also about not loading or performing any of the complex tasks, unless and only if the button is pressed

  • Verified answer
    Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Got it.  It should be as simple as using an If statement to check for the button press.  If true, then use the complicated filter.  If false, use your normal filter.

  • Tango Profile Picture
    1,168 on at

    @Rusk Thanks for that. My if statement is quite long as it is. Was hoping to have this filter somewhere seperate

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard