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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (55,532)