cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asafweis
Helper I
Helper I

Joining tables in powerapps

Hi,

 

I'm trying to join tables together as in the SQL querie below, but can't get my head around the sytax in powerapps.

 

ShipmentLines Left Outer Join Jobs on smljobid = jmpjobid Left Outer Join MfgReceipts on rmmJobID = JMPJOBID

 

Any help would be really appreciated.

 

Asaf

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @asafweis ,

 

How is it going of your project? Have you made it work on your scenario?

 

If it works and my answer helped, please consider Accept it as the solution to help the other members find it.

If any questions remain, please let us know.

 

Best regards,
Community Support Team _ Jeffer Ni

 

View solution in original post

4 REPLIES 4
mdevaney
Super User III
Super User III

@asafweis 
You can find an example of how to join two Power Apps collections at the link below.  It does the same thing as a SQL LEFT JOIN.

https://matthewdevaney.com/powerapps-collections-cookbook/join-all-columns-from-another-collection/

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

v-jefferni
Community Support
Community Support

Hi @asafweis ,

 

Do you want to combine three tables into one in Power Apps app?

If you do, you may use the collection by two steps for easy understanding:

 

Step 1: Join MfgReceipts to Jobs with below formula:

 

ClearCollect(
             NewTable,
             Ungroup(
                     AddColumns(
                                Jobs,
                                "GroupColumn1",
                                Filter(
                                       MfgReceipts,
                                       rmmjobid=jmpjobid
                                )
                     ),
                     "GroupColumn1"
             )
)

 

Step 2: Join the collection to ShipmentLines and drop the columns of ids:

 

ClearCollect(NewTable2,
             DropColumns(
                         Ungroup(
                                 DropColumns(
                                             AddColumns(
                                                        shipmentlines,
                                                        "GroupColumn2",
                                                        Filter(
                                                               NewTable,
                                                               jmpjobid=smljobid
                                                        )
                                             ),
                                             "smljobid"
                                 ),
                                 "GroupColumn2"
                         ),
                         "rmmjobid",
                         "jmpjobid"
             )
)

 

Thanks to @mdevaney , this solution is the expansion of the Blog above.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thank you.

 

I'll give it a go and post back how i go.

 

asaf

Hi @asafweis ,

 

How is it going of your project? Have you made it work on your scenario?

 

If it works and my answer helped, please consider Accept it as the solution to help the other members find it.

If any questions remain, please let us know.

 

Best regards,
Community Support Team _ Jeffer Ni

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,053)