PowerApps -- Passing Null Values to Entities in CDS

Alfwyn Jordan, 26 April 2019

In the current version of PowerApps, passing null to a text field is fairly easy as you can use the function Blank(). As the document states, this only works for data sources that support null values. CDS as a data source does not currently allow this.

To get around this, we need to enable an experimental feature: Formula-level error management. Primarily, this feature enables PowerApps to handle errors in a similar method to Excel through the introduction of several functions, IfError() and Notify(). It also enables users to write null values to SQL Servers, and more importantly for us to CDS entities. As detailed here in a PowerApps blog post.

To enable the feature, follow the steps outlined below:
1.    Navigate to the File menu in the PowerApps studio.

image
2.    Then to App Settings and Advanced Settings.

image
3.    Then scroll down to the Experimental features and you will want to toggle on the Formula-level error management.

image

Now we can pass a null record, number value or any other data type using the Blank() function.