cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Multiple Data Sources (Gallery)

So,

I have moved a database from access to SQL.

Installed and setup Powerapps and i am able to successfully create a single table app to view and update information.

 

Now i have lots of relational tables within SQL and data is normalised.

Now in a gallery form, how do I query another table.  As far as i can see I can only set 1 data source for the gallery, but due to the normalisation I end up with lots of numbers instead of the respective 'Description' from the linked table.

 

Are the days of normalisation gone and i just need lookups? Or is this actually possible.

I have searched and searched but nothing i have come accross seems to work.

 

Please help

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Multiple Data Sources (Gallery)

Hi @Delid4ve,

 

You need to add the other table as data source, then use the filter or lookup function to work with those tables:

Add a data connection in PowerApps

Filter, Search, and Lookup functions in PowerApps

Some other articles that you may have interests:

Understand data forms in Microsoft PowerApps

Yes, for Gallery control, it would only accept one data source, but you could take use of the table functions defined in PowerApps to work with the other table:

Understand tables and records in PowerApps

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Multiple Data Sources (Gallery)

Hi @Delid4ve,

 

You need to add the other table as data source, then use the filter or lookup function to work with those tables:

Add a data connection in PowerApps

Filter, Search, and Lookup functions in PowerApps

Some other articles that you may have interests:

Understand data forms in Microsoft PowerApps

Yes, for Gallery control, it would only accept one data source, but you could take use of the table functions defined in PowerApps to work with the other table:

Understand tables and records in PowerApps

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: Multiple Data Sources (Gallery)

Hi!

 

Not sure if this is of much help, but I have done what you're asking for, I think...

 

I have a form, let's call it Product form, where there is a field, Category, with an ID into a related table. In the DataCard for the field I have added a drop down box where the user indirectly can change the value of the id, but through actual, readable text. This is done by populating the drop down with the data from the related table.

 

I use a context variable (well, actually two, since the selected category also updates a field with a number from the related table) to hold the value of the drop down and then the actual field in the Product category form has this context variable as the default value. 

 

The initial value of the context variable is set in the Navigate-call to the edit form screen (the data is entered though another app, so no need for me to have a new form screen).

 

Data source lookup 1.pngThe actual field in the database is set through the context variableData source lookup 2.pngDrop down setting a context variable when the value changes

 

Hope this helps, feel free to shout back if I was too unclear.

Pripri804
Level 8

Re: Multiple Data Sources (Gallery)

Hi @BitLord69

 

How did you solve the error that comes up when selecting a another column rather than the 'ID'? 

 

image.png

Super User
Super User

Re: Multiple Data Sources (Gallery)

On your Onchange property you need to do a reverse lookup.

 

So:

UpdateContext({ConID:Lookup(Table,LawyersName=DataCardValue72.SelectedValue.LawyersName,ID)})

 

Hope this helps.

Pripri804
Level 8

Re: Multiple Data Sources (Gallery)

Hi @Delid4ve,

 

Unfortunately, it did not work... same error 

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 134 members 5,380 guests
Please welcome our newest community members: