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 / Filtering Unique Items...
Power Apps
Unanswered

Filtering Unique Items Between two lists based on a common field

(0) ShareShare
ReportReport
Posted on by 20

Hi All,

 

I have two SharePoint Lists, and i created an app that gets data from the first list, and it gets submitted to the second with some additional fields through a gallery.

 

One of the fields has a Unique number that exist on both SharePoint.

 

My question is: how can i filter out the data based on; if this field exists on the first SharePoint and is already submitted to the second SharePoint, i would like it to be filtered out of the application.

Categories:
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PowerAppsQ 

     

    According to your description, you want to filter the items both in the two SharePoint list based on the common fields.

    This is my two sharepoint list to test:

    vyueyunmsft_0-1699497031426.png

     

    This is my flow:

    vyueyunmsft_1-1699497031430.png

     

    (1)The GetItems , select,initial variable actions:

    vyueyunmsft_2-1699497031434.png

     

    (2)The “Apply to each” action:

    vyueyunmsft_3-1699497031436.png

     

    contains(union(body('Select'),body('Select')),items('Apply_to_each')?['Title']) 

     

     

    Then in the end we can use the compose action to see the result in the FilteredArray variable:

    vyueyunmsft_4-1699497031442.png

     

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

  • PowerAppsQ Profile Picture
    20 on at

    Hello, thank you for your response, its appreciated.

     

    what I want to achieve is to have the items in the gallery to contain only the unique items between the two lists (based on that unique ID field)

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PowerAppsQ 

    Thanks for your quick response . For example , the two lists are:

    vyueyunmsft_0-1699521984565.png

    And what is the  unique items between the two lists (based on that unique Title field)?

     

    In my above reply, the flow return the [t1,t2,t3] which exists both in the two lists.

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PowerAppsQ 

    Sorry , i may misunderstand your need , do you mean you want to realize it in Power Apps to get the data exists both in the two Lists.

    vyueyunmsft_1-1699522380180.png

    We can add the data in Power Apps:

    vyueyunmsft_2-1699522395161.png

    And we can use this in the Button -OnSelect:

    Set(LisA, ListATable);
    Set(ListB, ListBTable);
    Set(FilteredData, Filter(LisA, Title in ListB.Title ))

     

    The result is as follows:

    vyueyunmsft_3-1699522426083.png

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

  • PowerAppsQ Profile Picture
    20 on at

    Thank you for the reply and apologies if it wasn't too clear.

     

    I have List A and List B, both of them have a common field (Unique ID).

    The power App Gallery pulls data from list A and submits it to list B.

    i want the gallery to view only Unique items based on the unique ID field.

     

    as in only items that weren't already submitted from list A to list B to be in the gallery view, and the items that are common between that two lists (Already submitted) to disappear.

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @PowerAppsQ 

    Thanks for your quick response ! For your need , you can use this to filter the ListA to do not contains data in ListB:

    Filter( ListATable , !(Title in ListBTable.Title) )

    And this will not delegation in SharePoint .

    And you can also create a flexible gallery and make all the control in this gallery- Visible:

    !(ThisItem.Title in ListBTable.Title)

    The result is as follows:

    vyueyunmsft_0-1699523703654.png

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.You can also give me some sample data with a table to good understand so that i can help you better!


    Best Regards,

    Yueyun Zhang

     

     

     

  • PowerAppsQ Profile Picture
    20 on at

    Hello, thank you for this, I tried the solution, and it seems to be the right one. 

     

    however, something i don't understand happens.

     

    the gallery shows a limited number of old items only and it doesn't show new ones.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard