Home > PowerApps > Power Apps | Business Rule | Set Field Value vs Set Default Value

Power Apps | Business Rule | Set Field Value vs Set Default Value

While configuring Business Rules you might have noticed ‘Set Field Value’ and ‘Set Default Value’ Actions.

Though the ‘Set Field Value’ and ‘Set Default Value’ Actions look identical, there are following subtle differences.

Set Default Value:

  • ‘Set Default Value’ only triggers on ‘Create’ event and does not trigger on ‘Update’.
  • To understand this better lets go with an example, I’ve a ‘Student’ table with ‘Department’ and ‘College Fee’ columns.
  • In my ‘Business Rule’, I am setting ‘College Fee’ field value to ‘10000’ using ‘Set Default Value’, when the ‘Department’ sets to ‘IT’.
  • Now in my App, on Student’s ‘Create‘ form, the ‘College Fee’ field sets to ‘10000’ when the Department is IT as configured in Business Rule.
  • If I open an Existing ‘Student’ record, and set the ‘Department’ to ‘IT’, ‘College Fee’ field will not get set to ‘10000’, which proves that ‘Set Default Value’ action defined in ‘Business Rule’ does not trigger on ‘Update’ event.
  • One more key point is, ‘Set Default Value’ can’t override an existing field value.
    • For example, on ‘Student’ create form, manually type some value in ‘College Fee’ and then change the ‘Department’ to ‘IT’ .
    • This triggers ‘Set Default Value’ action, but the ‘College Fee’ value wont get changed to 10000 as there was already a manually typed presented in ‘College Fee’.
  • Also, ‘Set Default Value’ does not have ‘Clear’ option.

Set Field Value:

  • ‘Set Field Value’ triggers on both ‘Create’ and ‘Update’ of the record.
  • Also, ‘Set Field Value’ has a ‘Clear’ option.

Hope these differences helps you while choosing between ‘Set Default Value’ and ‘Set Field Value’,

🙂

  1. LoGoBro
    February 10, 2022 at 5:20 PM

    Hi. Thanks for the post! I want my users to be able to overwrite set values. Do you know if there’s any way to do this?

    • February 10, 2022 at 6:32 PM

      ‘Set Field Value’ of Business Rule should work.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: