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 / How to filter Is Null ...
Power Apps
Answered

How to filter Is Null from the collection

(0) ShareShare
ReportReport
Posted on by 2
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:
I have the same question (0)
  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @MIA27 ,

     

    Is this what you are trying to filter the collection?

    Filter(
     colServiceDates,
     ServiceDate <> Blank()
    )

    Hope this helps

  • MIA27 Profile Picture
    2 on at

    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 Moderator on at

    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.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard