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 / Need help joining tabl...
Power Apps
Unanswered

Need help joining tables in powerapps.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am trying to join data I have from 3 separate sharepoint lists to populate a datatable in powerapps.

 

The main issue is that I need records from one table to become columns in the datatable. 

 

Table: 

IDName
1Phone
2Speaker
3Headset

 

I need the Names of the table to become columns in my datatable. The tables are linked via ID keys, so performing lookup operations shouldnt be an issue; the issue is that I am struggling figuring out the syntax for essentially "looping" over this table and joining it such that these Names become columns in the datatable.

 

Any help appreciated.

Categories:
I have the same question (0)
  • datamaster Profile Picture
    250 on at

    Hi @Anonymous  you need to look into the AddColumn funtion along with the Lookup function to bring your one side table into you many table.

    ClearCollect(
    colJoinTable,
    AddColumns(
    colDetails,
    "Name",
    LookUp(
    colHeader,
    ID = HeaderID
    ).Name
    )
    )

     

    ------------------------------------------------------------------------------OfficePowerUser.com------------------------------------------------------------------------ 
    If this post helps answer your question, please click on “Accept as Solution” to help other members. If you thought this post was helpful, please give it a Thumbs Up. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the reply. Unfortunately that solution doesn't help in my case because if I wanted to add columns based on records, I can't simply hardcode a column name as the second parameter in the AddColumns function. I would need a way to essentially loop through a specified range of records, grab the item name, and use those as the column name in the Add Columns function. I'm starting to think this isn't possible..

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

    Hi @Anonymous ,

     

    Could you share more detail thoughts with your scenario?

    What is the relationship between these table? Can you describe more clearly?

    What is data source? What is the data type of columns?

     

    From my experience, Do you want to join two tables by the ID column? You can use ForAll function:

    AddColumns(TableB,"Name",""); ForAll(TableA, Patch(TableB, LookUp(TableB, ID = TableA[@ID]),{Name:TableA[@Name] }))

    The above code is creating the Name column in TableB, and Patch All TableA's name ( ID is matched) to TableB‘s Name column.

    It's just for reference, you can post more details, and I will provide the code that fit your App.

    Best regards,

    Sik

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard