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
Microsoft
Microsoft

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (59,103)