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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,424)