cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonahPincetich
Level: Powered On

Sharepoint Tasks Assigned To Data Source

Hello All,

I'm creating a Powerapp for Sharepoint Tasks. My users are currently able to create tasks but I want to give them the functionality to assign the tasks to one another by using the 'Assign To' field. On Sharepoint, when filling out this field, it autocompletes to a person that the task can be applied to.  Where can I get this list of people? I want to provide my users with this list so that they can decide who the task needs to be assigned to and then assign it to them.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sharepoint Tasks Assigned To Data Source

Hi @JonahPincetich ,

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

10.JPG

 set the OnSelect property of the "Patch" button to following:

Patch(
      '20181204_case13', 
      Defaults('20181204_case13'),
      {
        'Task Name': "PowerApps", 
        'Assigned To': Table({
                              DisplayName: User().FullName,
                              Claims: "i:0#.f|membership|" & Lower(User().Email), 
                              Department: "", 
                              Email: User().Email, 
                              JobTitle: "", 
                              Picture: ""
                       })
      }
)

 

On your side, you may need to modify your formula as below:

Patch(
      'Production Dev Task',
       Defaults('Production Dev Task'),
       {
         'Task Name': "xxxx",
         'Assigned To': ForAll(
                              Office365Users.SearchUser({searchTerm: "Jonah"}),
                              {
                                 DisplayName: DisplayName,
                                 Claims: "i:0#.f|membership|" & Lower(Mail), 
                                 Department: "", 
                                 Email: Mail, 
                                 JobTitle: "", 
                                 Picture: ""
                              }
                       )
       }
)

Please consider take a try with above solution, check if the issue is solved.

 

More details about the ForAll function, please check the following article:

ForAll function

 

Best regards,

Community Support Team _ Kris Dai
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

7 REPLIES 7
Super User
Super User

Re: Sharepoint Tasks Assigned To Data Source

Where are your users stored? Is it in Office365 or Dynamics365 or somewhere else? Once you tell me that, we can then create a dropdown or combo box, and allow the users to select a user or even start typing a name, and suggestions will come up. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

JonahPincetich
Level: Powered On

Re: Sharepoint Tasks Assigned To Data Source

They're stored in Office365. When I click on a users name in the task list on the sharepoint site it takes me to Delve.

Super User
Super User

Re: Sharepoint Tasks Assigned To Data Source

You need to use the Office365 connector and have a combobox or a dropdown with its Items property set to: Office365Users.SearchUser({searchTerm:""})

 

Users.PNG

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

JonahPincetich
Level: Powered On

Re: Sharepoint Tasks Assigned To Data Source

This was great and got me the users! But when I try to patch using a table of users from this data source I get a schema mismatch. Attached is an example in which I pull my own information from Office365 and try to Assign that to the AssignedTo portion of the Task object.

I really appreciate your help on the matter!

Super User
Super User

Re: Sharepoint Tasks Assigned To Data Source

I believe there are other errors as well in the Patch function but if you want to assign yourself to the Assigned To, can you try using something like this? 

 

Office365Users.MyProfile()

 

And all of your users are fetched from Office365 correct? I am asking to make sure that the AssignedTo is expecting a Office365 user record. 

 

Let me know how this goes. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

 

Community Support Team
Community Support Team

Re: Sharepoint Tasks Assigned To Data Source

Hi @JonahPincetich ,

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

10.JPG

 set the OnSelect property of the "Patch" button to following:

Patch(
      '20181204_case13', 
      Defaults('20181204_case13'),
      {
        'Task Name': "PowerApps", 
        'Assigned To': Table({
                              DisplayName: User().FullName,
                              Claims: "i:0#.f|membership|" & Lower(User().Email), 
                              Department: "", 
                              Email: User().Email, 
                              JobTitle: "", 
                              Picture: ""
                       })
      }
)

 

On your side, you may need to modify your formula as below:

Patch(
      'Production Dev Task',
       Defaults('Production Dev Task'),
       {
         'Task Name': "xxxx",
         'Assigned To': ForAll(
                              Office365Users.SearchUser({searchTerm: "Jonah"}),
                              {
                                 DisplayName: DisplayName,
                                 Claims: "i:0#.f|membership|" & Lower(Mail), 
                                 Department: "", 
                                 Email: Mail, 
                                 JobTitle: "", 
                                 Picture: ""
                              }
                       )
       }
)

Please consider take a try with above solution, check if the issue is solved.

 

More details about the ForAll function, please check the following article:

ForAll function

 

Best regards,

Community Support Team _ Kris Dai
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

JonahPincetich
Level: Powered On

Re: Sharepoint Tasks Assigned To Data Source

This worked perfectly for me! Thank you so much for your help @v-xida-msft and @PowerAddict!! It's really appreciated.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,834)