cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carterprine
Advocate I
Advocate I

Assign a planner task to myself from my Power App

Hello,

 

I have a gallery showing planner tasks in a grid. When one of the tasks is selected in the grid, I'd like the current user to be able to press a button that assigns the task to themself. Does anyone know if that's possible?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @carterprine ,

Do you want to assign tasks to current user by clicking a button?

Could you tell me the task gallery's Items?

I've made a similar test for your reference:

1)the task gallery's Items:

Planner.ListTasksV3("NC88FLrSUkxxxx","33022910-a3xxxx").value
//"NC88FLrSUkxxxx" is my plan id
"33022910-a3xxxx" is my group id
Planner.ListTasksV3 is used to list tasks based on planid and groupid

The result will have id field, which is task id.

2)insert a button inside the gallery

set the button's OnSelect:

Planner.AssignUsers(ThisItem.id,User().Email)

If you click the button, you will assign the specific task to current user.

 

You could use Planner.ListMyTasks().value to check current user's tasks.

5251.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

Hi @carterprine ,

Do you want to assign tasks to current user by clicking a button?

Could you tell me the task gallery's Items?

I've made a similar test for your reference:

1)the task gallery's Items:

Planner.ListTasksV3("NC88FLrSUkxxxx","33022910-a3xxxx").value
//"NC88FLrSUkxxxx" is my plan id
"33022910-a3xxxx" is my group id
Planner.ListTasksV3 is used to list tasks based on planid and groupid

The result will have id field, which is task id.

2)insert a button inside the gallery

set the button's OnSelect:

Planner.AssignUsers(ThisItem.id,User().Email)

If you click the button, you will assign the specific task to current user.

 

You could use Planner.ListMyTasks().value to check current user's tasks.

5251.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

This worked perfectly, thank you @v-yutliu-msft !

Thank you for the solution to this question. Upon assigning, it would be nice for the gallery to refresh and show the user is now assigned to the task in question. I attempted setting the formula to the following, without luck. Do you know how I could achieve that?

 

Planner.AssignUsers(FullfillmentTaskGallery.Selected.id,User().Email); Refresh(Planner)
 
Many thanks!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (17,896)