I have two SQL tables - '[dbo].[Person]' and '[dbo].[Department]'
In '[dbo].[Person]' there is a DepartmentID. I want to reference the DepartmentID in '[dbo].[Department]' and return departmentName based on the selected item in '[dbo].[Person]'
LookUp('[dbo].[Department]', DepartmentID = '[dbo].[Person]'.Selected.DepartmentID, DepartmentName)
LookUp('[dbo].[Department]', DepartmentID = ThisItem.DepartmentID, DepartmentName)
LookUp('[dbo].[Department]', DepartmentID = DepartmentID, DepartmentName)
The third option is the only one that returns anything - and it returns the first DepartmentName in '[dbo].[Department]' for all records
Solved! Go to Solution.
Are you using this formula in the Items property of the Gallery control? If so, please unserstand that one Gallery could only have one data source. To use the DepartmentID from '[dbo].[Person]', you need to first insert a dropdown control, set its Items property to:
Then set the Items property of the Gallery to:
Filter('[dbo].[Department]', DepartmentID = Dropdown1.Selected.Value)
To return the DepartmentName, with the Gallery control selected, click on the table name is the right side, then pick with field you want to show in the Gallery:
Would it be possible to put table A in a list - reference the "selection" from that list based on a selection from table B?
PersonID Name DepartmentID TitleID
1 Jack 2 3
2 Jill 1 2
2 Vice President
If I want information from PersonID 1 from Table A how do I display ?
Jack, Manufacturing, Director
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.