cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pseifert
Level: Powered On

Collecting data for gallery based on 2 sql tables

Hello,

I am attempting to bring in certain records from 2 tables and collect them on a button click (attached pictures for tables). I only want to collect records that have Completed=0 in the header table and thus only collect the records where Header.shipid=order.shipid after the "completed=1" are filtered out. I have no clue how to join tables from sql server in powerapps though.

 

Thanks in advance for any assistance!

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Collecting data for gallery based on 2 sql tables

Hi @Pseifert,

 

Could you please share a bit more about your requires for collecting records from sql tables?

What records do you really want to collect?

 

Filter('[dbo].[Table_Header]',Value(Complete) = 0)      /* collect records that have Completed=0 in the header table */

 

Filter('[dbo].[Table_Order]',ShipID in (Filter('[dbo].[Table_Header]',Value(Complete) = 1).ShipID))     /* collect the records where Header.shipid=order.shipid   and the  "completed=1" */

 

 

Hope this can be helpful.

Best Regards.

Yumia

 

aadilganie
Level 8

Re: Collecting data for gallery based on 2 sql tables

Hi @Pseifert

If you're only looking to view the records then it might be useful to create a view in SQL and do the join there, you can then use PowerApps to connect to that view. This post from Evan Chaki gives a good overview on how to do this.

 

https://powerapps.microsoft.com/en-us/blog/using-sql-server-views-in-powerapps/

 

Hope it helps!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,561)