cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Community Support
Community Support

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
Highlighted
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)

Highlighted
Helper I
Helper I

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.

Highlighted
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)

Highlighted
Helper I
Helper I

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!

Highlighted
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)

 

Highlighted
Community Support
Community Support

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

Highlighted
Helper I
Helper I

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,272)