Defaults function

Applies to: Canvas apps Model-driven apps

Returns the default values for a data source.

Description

Use the Defaults function to pre-populate a data entry form, making it easier to fill.

This function returns a record that contains the default values for the data source. If a column within the data source doesn't have a default value, that property won't be present.

Data sources vary in how much default information they provide, including not providing any at all. When you work with a collection or another data source that doesn't support default values, the Defaults function will return an empty record.

You can combine the Defaults function with the Patch function to create a record.

Syntax

Defaults( DataSource )

  • DataSource – Required. The data source for which you want default values.

Examples

Formula Description Result
Defaults( Scores ) Returns the default values for the Scores data source. { Score: 0 }