When using the SharePoint default form, you can easily clear values from each type of field by just editing the item, clearing the field value and saving the form. Unfortunately that doesn’t work that easy out of the box when using a Power Apps form.

In this blogpost, I will explain to you how you can achieve this in Power Apps as well.

As said, when using the default SharePoint form to clear a field value, you just edit the item, clear out the values and save the form. Easy as that:

Unfortunately, it is not this straightforward when using Power Apps. In the example below, I’ve created a simple Power App that has an editform, a save button and a viewform:

The save button has a simple SubmitForm() action that will push all changes to the SharePoint list. Or doesn’t it? When you clear all values from the editform (except for Title, because that’s a required field) and click Save form, only the multiline and Hyperlink field are cleared:

Blank vs. Null

So, how is this possible? After some digging on the web, I found this article which states that a Blank value cannot always be differentiated from a null value, resulting in unexpected behavior of your data storage. Although this article refers to SQL Server, I thought this was interesting for the scenario above. So I started playing around with this experimental feature ‘Formula-level Error Management‘ that was referred to in this article.

Formula-level Error Management

Formula Level Error Management is an experimental feature that’s been around for more than two years now. You can enable it from within your Power App by going to File > Settings> Advanced settings > Experimental features > Formula-level Error Management.

After turning this feature on, nothing really changes. Not on the visual aspect of things. But what happens now when you clear all fields inside your form and save it? That’s right, the corresponding item fields in SharePoint will get cleared as well:

If you are looking for a way to clear ‘special’ column types in SharePoint (such as Choice, People, Date or Lookup columns) using a Power Apps form, you should be aware that this isn’t possible out of the box.

You should use another option such as the experimental feature called ‘Formula-level Error Management’. There are also some other options for specific column types by using the Patch function or changing the Update parameter of your DataCard, but I won’t be covering this here.

However this feature is available for more than two years now, it is still an experimental feature. This means this feature could be altered or deprecated by Microsoft, resulting in unexpected behavior of your Power App. So please be aware of this when enabling this feature for your Production app(s).

Previous articleCounting Down to ESPC21 Online
Next articleFilter Dataverse Choice column in Power Apps Gallery
avatar
My name is Rik de Koning and I work as a Functional Consultant for Portiva, which is one of the larger Office 365 implementation partners in The Netherlands. I started my career in 2011 as a SharePoint support engineer and in 2013, I went to become a SharePoint consultant where I did various projects on SharePoint Server 2010 and SharePoint Server 2013. In the last couple of years I started focusing more and more on Office 365, especially on SharePoint Online, PowerApps and Microsoft Flow. I like being challenged and for PowerApps and Flow being quite new, there are always some challenges when implementing these services. When I’m not working, I like spend some time with my family (girlfriend and son), hang out with friends, do some sports (like fitness, running, kitesurfing and snowboarding) playing videogames and just relax a little. If you have any questions, please do not hesitate to contact me!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.