cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
landonjochim
Resolver I
Resolver I

Clearing a Person field in a SharePoint - Send an HTTP Request

I have seen a few posts on this and there is no easy way to clear a 'Person or Group' field within Power Automate so that the flow will clear out this field so if any Person was in this field, they would be cleared. I know that you need to send an HTTP request to do this. I have tried to follow a few other steps, but cannot get it working. Still getting an error on this action within my flow. Here are the details and then my current 'Send an HTTP Request' Action.

 

SharePoint List Name: "PurchaseRequest_PurchaseRequestList"

Person Column: 

  • Internal Name: "AssignedTo"
  • Name: "Assigned To"

Screenshot 2021-04-27 163949.png

 

I am sure I am just missing something, but I cant seem to figure out what that is. Any help would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
landonjochim
Resolver I
Resolver I

I had a handful of issues, but here is my working solution:

Site Address: <Site URL>

Method: POST

Uri: _api/web/lists/GetByTitle('<Form Library Name>')/items(<Unique Identifier of the Item>)

Header:

{

"Accept": "application/json;odata=verbose",

"Content-Type": "application/json;odata=verbose",

"X-HTTP-Method": "MERGE",

"IF-MATCH": "*"

}

Body:

{

"__metadata": {

"type": "SP.Data.<Form Library Name>ListItem"

},

"FieldNameId": "-1"

}

 

My issue was that because my list had an _ in the name, the Body JSON wouldnt recognize this and I had to replace the _ with PurchaseRequest_x005f_PurchaseRequestListListItem

 

landonjochim_0-1619645849789.png

 

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @landonjochim 

 

Please see this article

 

How to update the SharePoint People Picker Field using Power Automate - Collab365

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
landonjochim
Resolver I
Resolver I

I had a handful of issues, but here is my working solution:

Site Address: <Site URL>

Method: POST

Uri: _api/web/lists/GetByTitle('<Form Library Name>')/items(<Unique Identifier of the Item>)

Header:

{

"Accept": "application/json;odata=verbose",

"Content-Type": "application/json;odata=verbose",

"X-HTTP-Method": "MERGE",

"IF-MATCH": "*"

}

Body:

{

"__metadata": {

"type": "SP.Data.<Form Library Name>ListItem"

},

"FieldNameId": "-1"

}

 

My issue was that because my list had an _ in the name, the Body JSON wouldnt recognize this and I had to replace the _ with PurchaseRequest_x005f_PurchaseRequestListListItem

 

landonjochim_0-1619645849789.png

 

kcg633755
Helper I
Helper I

I have followed the above but I am still finding my HTTP Request is failing.


"status"
: 400,
"message": "An entry without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.\r\nclientRequestId: c0f2f924-db36-4e41-a54b-66541721533a\r\nserviceRequestId: 971c26a0-e0e8-3000-ac9e-869adb580c2d",

This is how it appears from my inputs...
Screenshot 2022-03-03 at 11.51.54.png





I am assuming it is something to do with the space in the title of the list.
So my list title = Build Projects
Writing is as Build%20Projects appears to work in the Uri but the type section of the body seems to not like any combination I have tried...

SP.Data.Build%ProjectsListItem
SP.Data.BuildProjectsListItem
SP.Data.Build ProjectsListItem
SP.Data.Build_x0020_ProjectsListItem

Any ideas what I am getting wrong.

Make sure there are two underscores before "metadata" in the Body. I think also in the Body you need to use "_x0020_" for the space, so SP.Data.Build_x0020_ProjectsListItem.

Also, I think four you it should be:

"SendtoStringId":"",

"SendtoId":-1

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,167)