Power Apps  

Understanding Defaults() and Parent.Default in Complex Power Apps Forms

Power Apps forms often become complex when they involve multiple data sources, conditional editing rules, reset logic, and SharePoint Integration components. Two functions that repeatedly cause confusion are:

  • Defaults() — used when creating new records

  • Parent.Default — used for binding controls inside forms

1. What is Defaults()?

Defaults() returns a blank template record with all fields initialized according to the data source.

We can use Defaults() when:

  • Creating a new record

  • Resetting a form

  • Clearing previous values when switching items

Defaults(DataSourceName)

This initializes an empty Feedback item with the correct schema.

1.1. Defaults() in Edit Forms

When you set a form’s Item property:

If(
    SharePointForm1.Mode = FormMode.New,
    Defaults(Feedback),
    SharePointIntegration.Selected
)

This ensures:

  • New Mode → loads an empty template

  • Edit Mode → loads real item

2. What is Parent.Default?

Parent.Default represents the value coming from the form (the parent control) to the control.

For example, for a TextInput inside a Form:

Default = Parent.Default

Choice Column

DefaultSelectedItems = 
If(
    IsBlank(Parent.Default),
    Blank(),
    [ Parent.Default ]
)

Note: Why we get wrong values in choice column?

When switching between list items:

  • Controls show old values

  • Radio buttons don’t refresh

  • Choice fields show outdated selection

Why It Happens?

Because the control uses:

  • Default = Parent.Default

  • But Power Apps does not automatically reset controls when the parent item changes

Example problematic scenario:

RadioInput.Default = Parent.Default

When item changes → Radio keeps old value (cached), unless Reset is triggered.

3. How to Force Controls to Refresh When Item Changes

To ensure controls reset every time the user selects a different SharePoint item:

3.1 Use a Reset Variable

Inside OnEdit / OnNew / OnView of SharePointIntegration:

Set(varResetControls, true);
Set(varResetControls, false);

Control’s Reset property:

Reset = varResetControls

3.2 Dynamic Default Logic

Example for radio button:

Default = 
If(
    SharePointForm1.Mode = FormMode.New,
    Blank(),
    Parent.Default
)

This ensures:

  • In New Mode, it is empty

  • In Edit/View Mode, shows actual value

4. Correct Patterns for Choice & Boolean Fields

4.1 Choice Column (Radio/Dropdown)

Default for Dropdown

DefaultSelectedItems =
If(
    IsBlank(Parent.Default),
    Blank(),
    [ Parent.Default ]
)

Reset Behavior

Reset = varResetControls

DisplayMode Logic Example

DisplayMode =
If(
    SharePointForm1.Mode = FormMode.View,
    DisplayMode.View,
    DisplayMode.Edit
)

4.2 Yes/No (Boolean) Fields

Default = Parent.Default   // TRUE / FALSE
Reset = varResetControls

Conclusion

Why Parent.Default is Gold for Editable Forms?

Parent.Default will always respect:

  • Form mode

  • Data source

  • Initial values

  • Reset

And it ensures the control is in sync with the form.