cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Delid4ve
Impactful Individual
Impactful Individual

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
v-micsh-msft
Community Support
Community Support

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
v-micsh-msft
Community Support
Community Support

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

BitLord69
Power Participant
Power Participant

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).

 

The actual field in the database is set through the context variableThe actual field in the database is set through the context variableDrop down setting a context variable when the value changesDrop down setting a context variable when the value changes

 

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

Hi @BitLord69

 

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

 

image.png

Delid4ve
Impactful Individual
Impactful Individual

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

 

So:

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

 

Hope this helps.

Hi @Delid4ve,

 

Unfortunately, it did not work... same error 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,907)