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

Patch a Person column from a collection (Repeating table)

Hi,

Re-posting again.

Can you please help me through , how to patch person column from power apps collection to SharePoint

 

After every row i use this code to patch value to collection and works fine:patch 1.PNG

when i try to patch value from collection to share point list , i am getting the following error,

patch 3.PNG

Owner Name - SharePoint list Person or group column

 

Error Screenshot,

error.PNG

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
DevendraSingh
Resolver I
Resolver I

Hi,

Replace the below query in your formula,

'Owner Name':{Claims:"i:0#.f|membership|devendra.singh@test.com", Department:"", Email:"devendra.singh@test.com", DisplayName:"Devendra Singh", JobTitle:"", Picture:""}

Change the email address and display name with your data.

Please click Accept as Solution, if this solution solved your issue. If this post was useful, please consider giving it Thumbs Up.


Thanks & Regards,

Devendra Singh

 

View solution in original post

4 REPLIES 4
DevendraSingh
Resolver I
Resolver I

Hi,

Replace the below query in your formula,

'Owner Name':{Claims:"i:0#.f|membership|devendra.singh@test.com", Department:"", Email:"devendra.singh@test.com", DisplayName:"Devendra Singh", JobTitle:"", Picture:""}

Change the email address and display name with your data.

Please click Accept as Solution, if this solution solved your issue. If this post was useful, please consider giving it Thumbs Up.


Thanks & Regards,

Devendra Singh

 

View solution in original post

v-yutliu-msft
Community Support
Community Support

Hi @Gayathri_TU ,

Is Owner Name the person value?

Does this column allow multiple value?

Please notice the structure of person field.

1)single person field:

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims:"i:0#.f|membership|emailaddress",
    Department:"",
   DisplayName:"fullname",
         Email:"emailaddress",
      JobTitle:"",
       Picture:""
   }

2)multiple person field:

Table({'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims:"i:0#.f|membership|emailaddress",
    Department:"",
   DisplayName:"fullname",
         Email:"emailaddress",
      JobTitle:"",
       Picture:""
   }
)

 

So to update person field, you also need to know that person's email address.

1)single person field:

 

ForAll(Subaction,
       If(!IsBlank(Title),
       Patch(....,
             ...,
            {..........,
              'Owner Name':
              {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims:"i:0#.f|membership|emailaddress",
               Department:"",
               DisplayName:name,
                Email:"emailaddress",
                 JobTitle:"",
                 Picture:""
               }
              }
         )
)
   }

 

//please replace emailaddress with that user's email

 

2)multiple person field:

 

ForAll(Subaction,
       If(!IsBlank(Title),
       Patch(....,
             ...,
            {..........,
              'Owner Name':
              Table(
                  {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims:"i:0#.f|membership|emailaddress",
               Department:"",
               DisplayName:name,
                Email:"emailaddress",
                 JobTitle:"",
                 Picture:""
               })
              }
         )
)
   }

 

 

 

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.
DBJ
Helper I
Helper I

Hi @Gayathri_TU ,

 

I'm doing something similar and curious what you set for the DefaultSelectedItems or Default of the person field in the form so that the name remains in the previous row when you add a row?

kmw1130
Post Patron
Post Patron

I'm having a similar issue, but your examples are manually entering the user (email), I a using a combo box for the person to select a user and then Patch and do the ForAll.  If I add a different user into the next repeating table, when I Patch and do the ForAll, the first user is not saved, it saves the 2nd one that was added.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,554)