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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 272 members 5,131 guests
Please welcome our newest community members: