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

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@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.

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

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,394)