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

Clean value in people fields

I was trying to build a flow that updates couple of people fields. I found an issue during the testing that Update Item event does not update the field if no value is provided. I could not find any event to set this field to null. I tried passing null extression value in update item but that returns an error.

 

I did some research and came accorss one article to suggest to use REST API to clear the value. I am going to try that but just wondering if there is any better way to reset this fields ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Clean value in people fields

Hi @imran7799 ,

 

Person fields can be updated in two cases. Depending on your settings for this field:

50.PNG

 

The first case is to use REST API to update field values for “Not Allow multiple selections”, which means that Person field contains only one user.

 

I did a test on my side and created a field of Person type with a field named Single.

By setting StringId of the corresponding field to null and setting the Id to -1, we can clear the value of this field. Specific details can refer to a similar Thread.

Body:

{ '__metadata': { 'type': 'SP.Data.ListNameListItem' }, 
'ColumnNameStringId': '',
'ColumnNameId':-1}

Image reference:

48.PNG

For more details about SharePoint REST API, please refer to following link:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-re...

 

The second case is for Allow multiple selections, which allows multiple user values in the field value.

Because the value of this field is an array, consider using an empty array variable to update this field.

Image reference:

49.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Clean value in people fields

Hi @imran7799 ,

 

Person fields can be updated in two cases. Depending on your settings for this field:

50.PNG

 

The first case is to use REST API to update field values for “Not Allow multiple selections”, which means that Person field contains only one user.

 

I did a test on my side and created a field of Person type with a field named Single.

By setting StringId of the corresponding field to null and setting the Id to -1, we can clear the value of this field. Specific details can refer to a similar Thread.

Body:

{ '__metadata': { 'type': 'SP.Data.ListNameListItem' }, 
'ColumnNameStringId': '',
'ColumnNameId':-1}

Image reference:

48.PNG

For more details about SharePoint REST API, please refer to following link:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-re...

 

The second case is for Allow multiple selections, which allows multiple user values in the field value.

Because the value of this field is an array, consider using an empty array variable to update this field.

Image reference:

49.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,740)