cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Related Tables in Power Apps -SQL connected

I'm new to Power Apps.

I'm trying to make my Customer History AWA (access web app) data available for edit/add/view on a phone.

I've created a connection to a table (customers) in SQL (Office 365) and an app has automatically been created showing the customers data in the table.

In the newly created app I've connected another table with Customer History (customer history has a lookup to customers)

Is it possible to create more screens in the same App based on the customer history table?

 

Once done does Podware Apps already 'know' the relationship between customers and customers history tables or do I need to do something?

 

I don't need lots of details yet - just need to know if it is possible to relate the data and build forms to display/edit/add related records?

If it is possible where do I find out how to do it?

 

Thanks for any advice

5 REPLIES 5
Highlighted
Power Apps
Power Apps

Re: Related Tables in Power Apps -SQL connected

Currently PowerApps will not now all the existing relationships, however you can certainly add new screens and do the relationships on the client.


In particular for example you could add a new screen (say CustomerHistoryScreen), and in teh Customer screen add a button on the Gallery to navigate to that screen and when you do that you can pass the "record" in the context (like Navigate(CustomerHistoryScreen, Fade, {BrowseRecord: ThisItem}).

 

Then in the CustomerDetailsScreen, you could add a Gallery and set the Items to the Customer Details data source filtered by the ID, for example Filter(CustomerDetails, CustomerID = BrowseRecord.CustomerID). That way it will display the records of that customer only.

 

You can follow the same for Inserts and Updates, but depending on the app you might need to rely in using Patch instead of the Form control.

Highlighted
New Member

Re: Related Tables in Power Apps -SQL connected

Thank you I'll give that a try 🙂

Highlighted
New Member

Re: Related Tables in Power Apps -SQL connected

Thanks Carlos!

 

Since you prefaced that with 'Currently', can we expect that PowerApps will eventually be able to load related tables/entities? I'm trying to use it as a replacement for LightSwitch and unfortunately related tables/collections are one area where LightSwitch had great support so it'd be very useful to see the same in PowerApps if possible.

 

Thanks again!

Highlighted
Frequent Visitor

Re: Related Tables in Power Apps -SQL connected

Same here. Lightswitch was a breeze to use. A real pity they turned the lights out 😞

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Related Tables in Power Apps -SQL connected

Hi there, quick question here:

 

Is possible to achive the same resulta but if one of the tables has a lookup condition?

 

I mean I have two Tables

Customers

Buildings

 

And in my Buildings table I have a lookup to ghet the customer ID.

 

What I am tryint to do is in my second screen filter the gallery based in my customer selected but I am getting invalid argument type.

 

Filter(Buildings_1,CustomerID = BrowseRecord.ID)

 

Please help!!!!!

 

Thanks in advance

 

 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,711)