cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft Employee

How to clear SharePoint "Person or group" field

I have a flow in which I would like to clear all values from the "Person or group" field in SharePoint list. Is there any way to pass an empty string in the "Update item" activity to this field?

3 ACCEPTED SOLUTIONS

Accepted Solutions
courtneo
Level: Powered On

Re: How to clear SharePoint "Person or group" field

This turns out to be a limitation of the system at the moment, and it holds for update of any field in a sharepoint list not just one of person/group type -- empty is interpreted as "don't update". It is not exactly a bug in the sense that sometimes "don't update this field if I didn't specify it" is in fact the behvarior that a person wants from the update-item action. So what we have here is a missing feature: you need a way to specify that you want to clear the field. I have filed a work item to look into adding something like this, will discuss internally.

courtneo
Level: Powered On

Re: How to clear SharePoint "Person or group" field

Hey guys, with apologies I was not clear in my previous answer: this is not actually a bug, it is a limitation of the "update item" action. Specifically: the action will interpret an empty field to mean that you do not want to update the field. This behavior is sometimes desired. This is a missing feature: you need a way to specify how you want "empty" to be interpreted: (a) as "don't update" or (b) as "clear the field". We are currently estimating estimating the work required to add support for this feature.

Super User
Super User

Re: How to clear SharePoint "Person or group" field

Hi @courtneo if you are from the staff you and the team can do like rest api do, passing -1, it works today in flow lookup and option column field


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

Gustavo Moraes, o astronauta brasileiro do Flow!


45 REPLIES 45
Super User
Super User

Re: How to clear SharePoint "Person or group" field

Hi @PWrobel

 

Simple put -1 in the column value and it's done.

 

Hope have helped,

 

Best Regards,

 

Gustavo Moraes


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

Gustavo Moraes, o astronauta brasileiro do Flow!


Microsoft Employee

Re: How to clear SharePoint "Person or group" field

Unfortunatelly putting -1 in the "ColumnName Calims" field casues the activity to crash with error "Bad gateway". Removing this -1 value fixes the workflow.

Super User
Super User

Re: How to clear SharePoint "Person or group" field

Hi @PWrobel

 

Can you post a print of your flow to us?

 

Best Regards

 

Gustavo Moraes


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

Gustavo Moraes, o astronauta brasileiro do Flow!


Microsoft Employee

Re: How to clear SharePoint "Person or group" field

Sure. THis is the screenshot of the error in activity and the overview of the flow. The error in the activity is 502 Cannot find user -1

flow diagram.pngactiviy details.png

courtneo
Level: Powered On

Re: How to clear SharePoint "Person or group" field

Ah, I see your trouble - if an empty value is specified then the field does not get updated. Having a look into this, it may be a bug, will update shortly.

courtneo
Level: Powered On

Re: How to clear SharePoint "Person or group" field

This turns out to be a limitation of the system at the moment, and it holds for update of any field in a sharepoint list not just one of person/group type -- empty is interpreted as "don't update". It is not exactly a bug in the sense that sometimes "don't update this field if I didn't specify it" is in fact the behvarior that a person wants from the update-item action. So what we have here is a missing feature: you need a way to specify that you want to clear the field. I have filed a work item to look into adding something like this, will discuss internally.

Super User
Super User

Re: How to clear SharePoint "Person or group" field

Hi @PWrobel

 

I did a mistake, a show you how update a 'lookup' not a 'user and group'. I tried other methods here but no success. I think as @courtneo, this should be a bug.

 

Sorry Smiley Sad

 

Wait with us the fix.

 

Best Regards,

 

Gustavo Moraes


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

Gustavo Moraes, o astronauta brasileiro do Flow!


courtneo
Level: Powered On

Re: How to clear SharePoint "Person or group" field

Hey guys, with apologies I was not clear in my previous answer: this is not actually a bug, it is a limitation of the "update item" action. Specifically: the action will interpret an empty field to mean that you do not want to update the field. This behavior is sometimes desired. This is a missing feature: you need a way to specify how you want "empty" to be interpreted: (a) as "don't update" or (b) as "clear the field". We are currently estimating estimating the work required to add support for this feature.

Super User
Super User

Re: How to clear SharePoint "Person or group" field

Hi @courtneo if you are from the staff you and the team can do like rest api do, passing -1, it works today in flow lookup and option column field


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

Gustavo Moraes, o astronauta brasileiro do Flow!


Microsoft Employee

Re: How to clear SharePoint "Person or group" field

Hi Courtneo

 

I think this is totaly expected that I do not have to fill all the fields if I just want to update just one field and leave other untouched. Using "-1" could be some workaround but in some cases I do would like to enter "-1" in the field as a value. I think the best option would be to have a checkbox next to the field that would say "Clear this field" and this way activity would know it needs to pass an empty value to the field. Thanks  for engaging in this.

krainer
Level: Power Up

Re: How to clear SharePoint "Person or group" field

Hi @courtneo 

 

do you have an idea of when we potentially can expect to have the functionality available?

 

having to call a SP REST service directly just to clear a value seems a little overkill Smiley Happy

 

 

/Brian

kodekreachor
Level: Powered On

Re: How to clear SharePoint "Person or group" field

A little late to the game here, but I've been able to successfully clear a Person field from Flow using the HTTP Request action. In this case, the field I'm clearing is named "IT Contact Original"ClearPersonField.png

Kim_KK
Level: Powered On

Re: How to clear SharePoint "Person or group" field

Hi @courtneo

 

It would be good to have the functionality available. Do you have the roadmap?

 

Thanks

 

Kim

MatthiasG
Level: Powered On

Re: How to clear SharePoint "Person or group" field

I also need this for one of my flows. I tried the null -expression to clear a Person or Group field in a sharepoint list, but this simply does noting. The Update Item actions runns successfoly, but it keeps the originally assigned person.

levijohnson
Level: Powered On

Re: How to clear SharePoint "Person or group" field

This thread is a year old, and STILL we have to rely on an HTTP call to clear a user field? THIS IS BEYOND FRUSTRATING!! How difficult would it be to accept "null" like every other field type to clear the field? 

THIS IS A BUG. Plain and simple. Every other field type can be cleared with 'null' except person fields. When can we expect an update? 

levijohnson
Level: Powered On

Re: How to clear SharePoint "Person or group" field

Also, if anyone comes across this thread, please give this idea an upvote:

https://powerusers.microsoft.com/t5/Flow-Ideas/Enable-null-function-to-clear-a-previous-value-from-a...

 

 

AuroraS
Level: Powered On

Re: How to clear SharePoint "Person or group" field

Hello @kodekreachor

 

I tried applying the Send an HTTP request to SharePoint based on your example. 

I must be missing something...

I got this error:

The expression "web/lists/GetByTitle('MyList')/items(Lists%2fMyList%2f6_.000)" is not valid.
clientRequestId: 58898472-9c4e-40e0-b375-8ca59c482efb
serviceRequestId: a7cbbb9e-70c3-8000-a706-b9227146f1ed

 

I replicated your example like this:FlowHTTP.PNG

 Thanks a lot for sharing  your knowledge! 

 

levijohnson
Level: Powered On

Re: How to clear SharePoint "Person or group" field

You're close, but you just put the wrong field in the ID Parentheses. Try finding 'ID' and not 'Identifier'. You may have to click the 'see more' button on the top right in powerapps where you select what field to pull from.

AuroraS
Level: Powered On

Re: How to clear SharePoint "Person or group" field

@levijohnson

 

Thank for the prompt response!!

Now this is the error I got:

Invalid JSON. Unexpected end of input reached while processing a JSON string value.
clientRequestId: aa32b484-321f-410f-9694-a3dec232ebc9
serviceRequestId: ddccbb9e-6097-8000-15db-c2540ebcdf39

 

 

Does the highligthed need to come from my SharePoint list also?

FlowHTTP2.PNG

 

 

>