I created an app where a supervisor can send push notifications to his/her associates. The issue is I set it up manually. So if a new associate comes in to that team, I will have to manually update the info:
The sharepoint List looks similar to this:
| Supervisor1ColumnName | Supervisor2ColumnName |
| message | message |
The user app section displaying the message has the following code where in this example users email 1,2 and 3 are agents under Supervisor1:
If(
User().Email="users email 1",Distinct(ListName,Supervisor1ColumnName).Result,
User().Email="users email 2",Distinct(ListName,Supervisor1ColumnName).Result,
User().Email="users email 3",Distinct(ListName,Supervisor1ColumnName).Result
);
Any ideas on how to reduce the code entry per user? Instead of "User().Email="users email 1",Distinct(ListName,Supervisor1ColumnName).Result," is it possible to use a different factor that encloses all agents under any supervisor regardless if an agent leaves that team or a new agent comes in?
I apologize if with the info provide might be hard to grasp the main idea. Please ask clarifying questions if necessary TY

Report
All responses (
Answers (