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 / On Button Click Filter...
Power Apps
Answered

On Button Click Filter Blank Dates in Gallery

(0) ShareShare
ReportReport
Posted on by 657
Hi,
 
I'm using below code in OnSelect property applied to a button
CountIf(YourSharePointList, IsBlank(ReceiptDate))
For for the Items property with the Gallery I'm using below code, but this is not filtering the Gallery
SortByColumns(Search('YourSharePointList', TextInput1.Text,Column1 , 'Column 2', 'Column 3'),"Modified", SortOrder.Descending)
I tried to add ReceiptDate in the above code, but this does not filters the Gallery. TextInput1.Text is used to search within the Gallery.
 
Getting below error: Wrong column type. Expects text type
 
Please advise. Thanks!
 
Prem
Categories:
I have the same question (0)
  • Suggested answer
    mmbr1606 Profile Picture
    14,605 Super User 2026 Season 1 on at
    hey
     
     
    can u try this:
    SortByColumns(
        Filter(
            'YourSharePointList',
            IsBlank(ReceiptDate) && 
            (TextInput1.Text = "" || Search(Title, TextInput1.Text) > 0)
        ),
        "Modified",
        SortOrder.Descending
    )
    
    if my answer helped please mark as verified
     
     
    cheers
  • Prem4253 Profile Picture
    657 on at
     
    I'm getting below error at Search line:
    Invalid number of arguments: received 2, expected 3 or more
     
  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2026 Season 1 on at
    hey
     
     
    can u try this modification:
    SortByColumns(
        Filter(
            'YourSharePointList',
            IsBlank(ReceiptDate) && 
            (
                TextInput1.Text = "" || 
                StartsWith(Column1, TextInput1.Text) || 
                StartsWith(Column2, TextInput1.Text) || 
                StartsWith(Column3, TextInput1.Text)
            )
        ),
        "Modified",
        SortOrder.Descending
    )
    
     
  • Prem4253 Profile Picture
    657 on at
     
    Yes, this did the trick to only show fields within the gallery which has blank dates. I added a ReceiptDate button in which I can also see the count of blank dates.
    I also have a Shipping Date column, for which I added a button and I'm also able to see the count. And below is the logic I added to OnSelect property (where Receipt date is not blank but Shipping date is blank)
     
    CountIf(YourSharePointList, !IsBlank(ReceiptDate) && IsBlank(ShippingDate))
     
     
    But when I click Shipping Date button, the gallery does not filters
    Sorry I was not too clear in my initial request. Please advise
     

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
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard