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 / If search is blank the...
Power Apps
Answered

If search is blank then show nothing in gallery

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm fairly new to Power Apps, however I'm in the building of creating one and I'm having a few issues...

 

I'm using the below query to filter the search, however when the search field is empty, currently it shows everything available, rather than showing a blank gallery...can someone please help me work out how to do this?

 

Query being used:

SortByColumns
  (Search
    (Filter
      ('Purchase Order Requests',
        (Title = "Pending" Or Title = "Submitted" Or Title = "Open" Or Title = "Further Action Required")),
        POFilterInput.Text,'PO Number','Requisition Number'),"ID",SortOrder.Descending)

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at

    hey @HSK2507 

     

    can you try this:

    If(
     IsBlank(POFilterInput.Text),
     ClearCollect(EmptyGallery, {}),
     SortByColumns(
     Search(
     Filter(
     'Purchase Order Requests',
     Title = "Pending" Or 
     Title = "Submitted" Or 
     Title = "Open" Or 
     Title = "Further Action Required"
     ),
     POFilterNext.Text,
     'PO Number',
     'Requisition Number'
     ),
     "ID",
     SortOrder.Descending
     )
    )
    

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

     

  • HSK2507 Profile Picture
    on at

    Thanks for the response @mmbr1606, I have tried this however it has not made the gallery blank. Do I need to replace Empty Gallery with the gallery name at all?

  • Verified answer
    HSK2507 Profile Picture
    on at

    I've managed sort it using the below, @mmbr1606 you we're almost there...

     

    If(!IsBlank(POFilterInput.Text),
    SortByColumns
        (Search
            (Filter
                ('Purchase Order Requests',
                    (Title = "Pending" Or Title = "Submitted" Or Title = "Open" Or Title = "Further Action Required")),
                        POFilterInput.Text,'PO Number','Requisition Number'),"ID",SortOrder.Descending))

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard