Hi @FabianAckeret ,
Do you want to filter your Employees List based on current login user in manager column, and only display one entry per Employee within the Gallery?
Based on the issue that you mentioned, I think the combination of Filter function, GroupBy function and AddColumns function could achieve your needs.
I have made a test on my side, please take a try with the following workaround:
Set the Items property of the Gallery to following formula:
DropColumns(
AddColumns(
GroupBy(
Filter(
'YourEmployeeList',
manager.Email = User().Email
),
"employee",
"GroupData"
),
"Title",
First(GroupData).Title,
"date",
First(GroupData).date
"manager",
First(GroupData).manager
),
"GroupData"
)
Then you could display employee, Title, date and manager column value in one entry per employee in your Gallery.
Above formula may cause a Delegation warning issue (the Pesson type column could not be delegated within SP connector), if the amount of your SP List records is not more than 2000, you could ignore this warning issue.
If the amount of your SP List records is not more than 2000, please take a try with the following workaround:
1. Set the "Data row limits for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app.
2. Set the OnStart property of the App control to following:
ClearCollect(RecordsCollection, 'YourEmployeeList')
3. Modify above formula within the Items property of the Gallery as below:
DropColumns(
AddColumns(
GroupBy(
Filter(
RecordsCollection,
manager.Email = User().Email
),
"employee",
"GroupData"
),
"Title",
First(GroupData).Title,
"date",
First(GroupData).date
"manager",
First(GroupData).manager
),
"GroupData"
)
In addition, if the amount of your SP List records is more than 2000, please check and see the alternative solution within the following thread would help in your scenario:
https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/m-p/243777#M71518
More details about Delegation in PowerApps, please check the following article:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview
Please take a try with above solution, then check if the issue is solved.
Best regards,