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

On Button Click Filter Blank Dates in Gallery

(0) ShareShare
ReportReport
Posted on by 652
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 2025 Season 2 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
    652 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 2025 Season 2 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
    652 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

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 765 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 272

Last 30 days Overall leaderboard