This will be a little difficult as by default, the Planner connector in PowerApps allows you to create tasks and assign them to individual users.
How ever you can try this :
Concatenate the user IDs (separated by semicolons) and assign the task to this combined group.
Here’s an example of how you can achieve this using the Planner.CreateTask function:
Assignees = Office365Users.SearchUser();
Planner.CreateTask(
PlanID,
TaskTitle,
{
bucketId: BucketID,
startDateTime: StartDate,
dueDateTime: DueDate,
assignments: Concat(Assignees.SelectedItems, Id, ";")
}
)
In the above formula:
- PlanID, BucketID, TaskTitle, StartDate, and DueDate are placeholders for your actual values.
- Assignees refers to a control (e.g., a combo box) where you select multiple users.
- The Concat function combines the selected user IDs into a semicolon-separated string.
Try this and let me know if it works for you.
As for the add/remove specific users,
- You can use collections or data sources to store information about users and their associations with buckets.
- When adding users to a bucket, update the relevant collection or data source accordingly.
- For example, if you have a collection called Team1Users and another called Team2Users, you can add or remove users as needed:
// Add a user to Team 1
Collect(Team1Users, { UserId: UserToAdd.Id, Name: UserToAdd.Name })
// Remove a user from Team 2
Remove(Team2Users, LookUp(Team2Users, UserId = UserToRemove.Id)) - You can then use these collections as data sources for your app’s user management features.