Power Apps : Clear Date, Person, Choice, Managed Metadata field values in edit form of SharePoint List/Library

SharePoint sometimes surprisingly lacks very basic operations like clearing up a choice, date and other lookup fields in the edit form. By default, when you edit an item using a power apps customised form, the values of the special fields like date, choice , managed metadata, person or group field etc cannot be cleared. If you remove the value from the input control and save the item, the old value will still persist. This post is about a simple technique using powerapps to clear the values of any special field in SharePoint.

Enable an experimental feature

The technique in this post is based on an experimental feature (Writing null values to Database), so I want to give a disclaimer that using this on production comes with a risk that Microsoft can in future decide to stop providing this feature.

My personal opinion is that this feature is an important milestone for PowerApp as a product and highly unlikely that it will be dropped. But use your judgement by reading the post by Microsoft on this, which is linked below this blog.

To turn on the experimental feature, open the Settings of your power app and click on Advanced Settings. Under advanced settings, you will see a section called “Experimental features” and under that enable “Formula-level error management”.

If you are wondering why error management feature needs to be enabled for clearing values of SharePoint list, the reason is errors in PowerApps would result in a blank or null value and PowerApps did not have the capability to differentiate an error from a blank value. With this experimental feature they are bringing this capability. You can read this full post by Power Apps team explaining the experimental features. It’s been almost 3 years since the post, but the feature is still “experimental”.

So, once you turn on this feature if user clears the input field for any special column type in SharePoint, after saving the form the column value will be cleared in the back end SharePoint list!

Reference :

New Experimental Feature: Error Handling and Writing Null values to databases

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s