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

Save Powerapp form to SharePoint issue

Hi All,

 

I've created a powerapp which is connected to a SharePoint list. 

In this app I have two People pickerfield which I auto fill (DefaultSelectedItems) with the following command:

 

Field "Indiener":  Office365Users.MyProfile()

 

Field "Manager":

If(!IsBlank( Office365Users.MyProfile()),Office365Users.Manager(Office365Users.MyProfile().UserPrincipalName))

 

When I open the form the fields are filled with the correct values. But when I save the form the People picker fields are not saved into SharePoint. 

When I manually enter the people picker fields it succesfull saves the values to the SharePoint site.

 

The issues seems related to the (DefaultSelectedItems) setting but I don't know how to fix this!

 

Any idea?

 

Kinds regards,

 

Jeroen Bestebreurtje

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Save Powerapp form to SharePoint issue

Hi @Bestebreurtje,

 

This is because that SharePoint person and group column does not store the data as the way user profiles are stored in Office365 Users connection. You need to use Patch function to update the user information got from Office365 Users connection to SharePoint list. The formula should be something like this:

Patch(Patchtesting,
      Defaults(Patchtesting),
      { Title:"SinglePerson",
       Person: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims:"i:0#.f|membership|Lower(Office365Users.MyProfile().Mail)",
    Department:"",
   DisplayName:Office365Users.MyProfile().DisplayName,
         Email:Office365Users.MyProfile().Mail,
      JobTitle:"",
       Picture:""
   }})

Regards,

Mona

Community Support Team _ Mona Li
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
Highlighted
Resolver II
Resolver II

Re: Save Powerapp form to SharePoint issue

Hi, are you putting in the field after the seletedItems? example
cboEmployee.SelectedItems.Employee

Highlighted
Helper I
Helper I

Re: Save Powerapp form to SharePoint issue

Hi,

 

Thanks for your reply, not sure if i know what you mean and how I can add this after Office365Users.MyProfile()

 

 

 

 

Highlighted
Community Support
Community Support

Re: Save Powerapp form to SharePoint issue

Hi @Bestebreurtje,

 

This is because that SharePoint person and group column does not store the data as the way user profiles are stored in Office365 Users connection. You need to use Patch function to update the user information got from Office365 Users connection to SharePoint list. The formula should be something like this:

Patch(Patchtesting,
      Defaults(Patchtesting),
      { Title:"SinglePerson",
       Person: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims:"i:0#.f|membership|Lower(Office365Users.MyProfile().Mail)",
    Department:"",
   DisplayName:Office365Users.MyProfile().DisplayName,
         Email:Office365Users.MyProfile().Mail,
      JobTitle:"",
       Picture:""
   }})

Regards,

Mona

Community Support Team _ Mona Li
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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,977)