Yesterday on LinkedIn I was asked about how to clear a people field using Microsoft Flow, by Matthew Bourne working at Heathrow.
These kind of things can be a real challenge. When you update a list item an empty value simply means ignore this field. To go through the issues here I will start by creating a flow that creates an item in a SharePoint list.
Creating list items
Updating List Items
When I run this flow an item will be created and I can use the ID of this item to update my list item.
Managing required fields
The first pain is already visible. The Title field is a required field and I can’t save my flow. I can create a view without the Title field however that will still not help me. The required Title field still appears in the update item action
To work around this issue I’m going to set the Title to the title of the created item
Looking at the item created in SharePoint I’ve now got the described result. Even though I left fields blank the updated item will have the values set as specified in my create an item action.
How do we now set values to blank?
With Choice fields and many other field types I can simply set the value to null and as shown below the Choice field is cleared.
Having built up my confidence I’m just going to set all fields to null. Easy Job done! …
… or maybe not. When I ran the above flow I foudn that the update item action now failed.
Looking at the detail of the failing action, I got an error on the user field:
The specified user could not be found