Latest Posts

PowerApps Create blank or null value


The Blank function in PowerApps is used to create a blank value. This function is useful for initializing variables, resetting form fields, and handling null values. A blank value is different from an empty string or zero; it specifically represents the absence of a value.

PowerApps – Blank() Syntax

 

 

Blank()

 

 

Notes:

-        The Blank function does not take any arguments.

-        A blank value is different from an empty string ("").

-        Use IsBlank to check for blank values and IsEmpty to check for empty collections or tables.

-        Ensure that your data source supports blank values. Some data sources might treat blank values differently or not support them at all.

PowerApps – Initialize variable to blank value

To initialize a variable named MyVariable to a blank value:

 

Set(MyVariable, Blank())

 

PowerApps - Reset a Text Input Control using Blank() function

To reset the text input control named TextInput1 to a blank value:

 

TextInput1.Text = Blank()

 

PowerApps - Clear a Form Field using Blank() function

To clear a specific field in a form:

 

UpdateContext({ FormField: Blank() })

 

PowerApps – Handle Optional Fields using Blank() function

When dealing with optional fields in a dataset, use Blank to represent the absence of a value:

 

Patch(DataSource, Defaults(DataSource), { OptionalField: Blank() })

 


We value your Feedback:

Page URL:

Name:

Email:


Suggestion:

© 2024 Code SharePoint