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]'
I tried:
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.
Hi @ChipMichael,
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:
Distinct( '[dbo].[Person]',DepartmentID)
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:
Regards,
Mona
Would it be possible to put table A in a list - reference the "selection" from that list based on a selection from table B?
i.e.,
Table A
PersonID Name DepartmentID TitleID
1 Jack 2 3
2 Jill 1 2
Table B
DepartmentID DepartmentName
1 Marketing
2 Manufacturing
Table C
TitleID Title
1 President
2 Vice President
3 Director
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.
User | Count |
---|---|
273 | |
245 | |
83 | |
37 | |
34 |
User | Count |
---|---|
356 | |
247 | |
128 | |
73 | |
44 |