Search code examples
powerappspowerapps-canvaspower-platformpowerapps-collection

combine 2 data sources and display data on single table in power apps


  • work environment : power apps

  • data source : employee table and department table in sql server.

  • the problem scenario : please, have a look on the diagram : Combine table columns and create one single table to display on power apps.

as per the diagram I want to display a table on the simple canvas app which is a combined result of both employee and department table.

I have no idea how I could do that in power apps. tried many things maybe I am doing it in an incorrect way.


Solution

  • App > On Start:

    ClearCollect(NewTable,
        AddColumns(Employee_Table,
            "Department_Name",LookUp(Department_Table,Department_ID=Employee_Table[@Department_ID],Department_Name)))
    

    Then set the table's item to NewTable.