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

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

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.

View solution in original post

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.

View solution in original post

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!


View solution in original post

53 REPLIES 53
gamoraes
Memorable Member
Memorable Member

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!


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

gamoraes
Memorable Member
Memorable Member

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!


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
Microsoft
Microsoft

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.

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.

View solution in original post

gamoraes
Memorable Member
Memorable Member

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 😞

 

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!


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.

View solution in original post

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!


View solution in original post

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.

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 🙂

 

 

/Brian

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

Hi @courtneo

 

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

 

Thanks

 

Kim

Anonymous
Not applicable

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.

Anonymous
Not applicable

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? 

Anonymous
Not applicable

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...

 

 

Anonymous
Not applicable

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! 

 

Anonymous
Not applicable

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.

Anonymous
Not applicable

@Anonymous

 

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

 

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,581)