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

Notifications

Announcements

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,164

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:
I have the same question (0)
  • 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,505 Super User 2025 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,164 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,164 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,164 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,164 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard