Hi Powerapps Community
I've seen several very similar posts about collecting lookup-columns form sharepoint lists, but none of those seem to fit my problem.
Scenario:
In my sharepoint list Roles, I have several hundred job responsibilities respresented in just as many rows. My goal in PowerApps is to assign and remove employees to and from those responsabilities. The employee-IDs and their names are stored in another list Employees.
My idea was to store the employee-IDs per role within a look-up column, that gets their information from Employees (see att. Lookup-Columns). Getting the ID from assigned employees into to collection is no problem. In order to avoid nested tables, I immediatly used .Values.
ClearCollect(
collMAZuge;
First(
Filter(
'Roles';
ID = Rollen_Gallery.Selected.ID
)
).MA_Zugeordnet.Value
)
Problem:
I'd like to sort assigned employees by their names, so I need to add a second column to the collection containing those names.
It's completely stupid, but I can't seem to find a way to get those names into a second column. I've tried workarounds with AddColumn, ShowColumn, even added an additional field within my list roles (see attachment.), but nothing has worked out so far.
There has to be a way to easily get a collection that represents the two columns from sharepoint like this:
| ID | Name |
| 112 | John |
| 114 | Jack |
| 1119 | Michael |
Any idea how to do this? Or maybe an idea for a different approach without using the names? Sorting lookup-returns is not possible, thats why I came up with the names-column in the first place.
Thanks everybody!