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 / Filter datatable based...
Power Apps
Answered

Filter datatable based on ID from another sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I'm trying to populate a records from a dataTable which matches an ID from a different datasource. 

The Datatable has a datasource from a sharepoint list (sharepoint2) which is linked to datasource from another sharepoint list (Sharepoint1). So if Sharepoint1 ID is 332 I would like to filter Datatable to only show items from ID 332.

Sharepoint2 is set up to populate records from the ID from Sharepoint1.

 
 
Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    I am going to try to give you a sample formula without knowing your exact column names. Also, how are you capturing the input from the user for Sharepoint1 ID? I am going to assume that its in a textbox. Let me know if its different. 

     

    The datatable Items property should be something like this: 

     

    Filter(Sharepoint2, ID = textbox1.text)

     

    OR if you want to populate all items for Sharepoint2 where the ID is a value in Sharepoint1, then:

     

    Filter(Sharepoint2, ID in Sharepoint1.ID)

     

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PowerAddict ,

    Unfortunately this shows all items from Sharepoint2. Sharepoint2 is set up (by flow) to capture the ID, Author, Comment Date and comment from Sharepoint1 when an item is added in Sharepoint1.

     

    FilterID.jpg

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Let me make sure I got it right:

    1. You have data in Sharepoint1 that has unique IDs.

    2. You also have data in Sharepoint2 that has the same IDs.

    3. You want to show only those records from Sharepoint2 where the ID is the same as the ID of the Sharepoint1 record you are on

    Is that correct? Then how is the user selecting a record from Sharepoint1?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You are right,

     

    1. This is the main sharepoint that gets all data logged from the PowerApp.

    2. Sharepoint 2 is set up to capture the ID, Author, Date, and comment. Once an item is registered to Sharepoint 1 a flow will run and feed these 4 fields from Sharepoint1 to Sharepoint2.

    3. Correct.

     

    Thanks @PowerAddict  for looking itno this :).

     

    Regards,

    Trond

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So @PowerAddict there are 2 different data sources:

    FilterID2.jpg

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry, it's the other way around... Top Data Source is Sharepoint1 and bottom (DataTable) is Sharepoint2

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PowerAddict ,

     

    It worked :). I had to use the datacard value in the Source:

    Filter(Comments_WBS, wbsID in DataCardValue156_1.Text)

     

    DatacardValue156_1 holds the ID value from Sharepoint1 

     

    Thanks 🙂

     

    Regards,

    Trond

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard