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 / How to use multiple fi...
Power Apps
Answered

How to use multiple filter to filter a datsource for gallery items

(0) ShareShare
ReportReport
Posted on by 143

Hi All, 

I have seen examples online but none meets my requirements. I want to use multiple filters to filter out items in a datasource used to populate the items in a gallery, I have something like;

 

If(ExcludeInput.Text<>"",Filter(newResults, Not(ExcludeInput.Text in metadata_storage_name)),newResults)

If(!IsEmpty(DeletedRecords),Filter(newResults, Not(metadata_storage_path in DeletedRecords.metadata_storage_path)),newResults)

 

 

How do I merge both filters to make it work, I want to remove items typed in the "excludeInput" text box and as well items in the "DeletedRecords" data source.

 

Thank you.

@RezaDorrani can you help pls?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @onyebuchiboss 

    Please consider changing your Formula to the following:

    Filter(newResults, 
     (IsBlank(ExcludeInput.Text) || !(ExcludeInput.Text in metadata_storage_name) &&
     ((CountRows(DeletedRecords)=0) || !(metadata_storage_path in DeletedRecords.metadata_storage_path))
    )

     

    I hope this is helpful for you.

  • onyebuchiboss Profile Picture
    143 on at

    Thanks for responding Randy, but the system wouldn't recognise the DeletedRecods.metedata_storage_path, even though it obviously in the collection properties.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @onyebuchiboss 

    How are you defining that DeletedRecords table?

  • onyebuchiboss Profile Picture
    143 on at

    Sorry, but this ddnt work.

  • onyebuchiboss Profile Picture
    143 on at

    It is a collection of items from the gallery, since it is deleted, I do not want users seeing it.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @onyebuchiboss 

    How are you defining that DeletedRecords table?  What is the formula?

  • onyebuchiboss Profile Picture
    143 on at

    I was able to finally use your suggestion, your formula just only needed an extra bracket, just still not working. this is how I collect the DeletedRecords;

    Collect(
     DeletedRecords,
     {
     id: "1",
     metadata_storage_path: galleryResults.Selected.metadata_storage_path,
     decoded_path: decoded_path2,
     deletion_scheduled_date: Text(Now(),"[$-en-US]yyyy-mm-dd"),
     deletion_scheduled: true,
     who_deleted: User().FullName,
     who_marked_deleted: User().FullName
     });
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @onyebuchiboss 

    Ah yes, I see there was a paren missing.  Should have been:

    Filter(newResults, 
     (IsBlank(ExcludeInput.Text) || !(ExcludeInput.Text in metadata_storage_name)) &&
     ((CountRows(DeletedRecords)=0) || !(metadata_storage_path in DeletedRecords.metadata_storage_path))
    )

     

    So what part is not working and elaborate on what is happening and expected.

  • onyebuchiboss Profile Picture
    143 on at

    I can see the records in the DeleteRecords collection, and can still see the records in the gallery, so the filter isn't working.

  • onyebuchiboss Profile Picture
    143 on at

    My bad, I have just put the Paren in the right place and it worked. Thanks a lot! I will mark as solution.

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 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard