So I am trying to make a pretty simple app that basically uses my current SQL sources. I am having an issue though in combining the 3 different tables together so my Gallery has info from the different spots AND then sorting and filtering that same list? Is that possibile?
My data looks something like this:
Physicians | Name, ID, Phone
Physician Office | Address, Physician_ID, Office_ID
Contacts | Office_ID, SalesRep_ID
Reps | SalesRep_ID, RepName
What I want to do is have a listing of the Physicians and then get all the way down to the RepName... to do that I need to hop through 3 tables and do matches as you see.. from searching through I found that on the ITEMS list I can add columns, which worked for one table, but not sure how to add the others. Then in addition I would then like to SORT and FILTER on that Items list.. so I am stuck. 1) I am unsure how to add more than one addcolumns to get results from multiple tables? 2) I am unsure how to addcolumns in the items area and then also add a sort and filter?
I think I am not in the right direction at all.. any help on what I am supposed to be doing to get these to work? Or am I supposed to be building a collection or using the Collection service for something like this instead?
Thanks for the help. New to the product.
Within PowerApps you could take use of Lookup() function to find the proper data through another table.
For example, if we have the proper record selected from the Physicians table from a Gallery1,
then to get the RepName, the formula should be:
Lookup(Reps, SalesRep_ID= Lookup(Contacts, Office_ID= Lookup(Physician Office, Physician_ID=Gallery1.Selected.ID).Office_ID ).SalesRep_ID
To AddColumns within PowerApps, we need to take use of the AddColumns function, for more details, please see:
Some more readings: