Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to filter Is Null from the collection

(0) ShareShare
ReportReport
Posted on by
I am using power app Teams
 
I am using the below collection on Gallery Select Item Property. Its working fine.
Want to modify the code as below :
 
If Service Date Is Blank, then should not populate that row.
Now it populating 5 rows even if date is not there in the row.
Therefore, I want to filter based on Service Date, But confused how to do
 

 

ClearCollect(
 colServiceDates,
{ServiceDate: ThisItem.ExtraSvc1Field1, ServiceSMR: ThisItem.ExtraSvc1Field2},
{ServiceDate: ThisItem.ExtraSvc2Field1, ServiceSMR: ThisItem.ExtraSvc2Field2},
{ServiceDate: ThisItem.ExtraSvc3Field1, ServiceSMR: ThisItem.ExtraSvc3Field2},
{ServiceDate: ThisItem.ExtraSvc4Field1, ServiceSMR: ThisItem.ExtraSvc4Field2},
{ServiceDate: ThisItem.ExtraSvc5Field1, ServiceSMR: ThisItem.ExtraSvc5Field2},
);<div> <div> </div></div>

 

Categories:
  • Verified answer
    Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: How to filter Is Null from the collection

    Hi @MIA27 ,

    You don't have to, If you are adding the values in the collection and later want to exclude blank values. You can try the code I gave.

     

    But if you don't even want to introduce into your collection then you can handle using If(!IsBlank(TextBox.Text), //add in collection) kinda stuff.

     

    Its all up to you how you manage it.

  • MIA27 Profile Picture
    on at
    Re: How to filter Is Null from the collection

    You mean I need to add another collection under it, and now the gallery to be based on the new collection name.

    Pls. confirm so that I can do the changes in the app.

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: How to filter Is Null from the collection

    Hi @MIA27 ,

     

    Is this what you are trying to filter the collection?

    Filter(
     colServiceDates,
     ServiceDate <> Blank()
    )

    Hope this helps

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard