Business Rules
In this Blog,
Introduction to Business Rules
Business rules are used to validate data inside a Dataverse table.
By combining conditions and actions, you can do any of the following with business rules:
Column type support with business rules
Business rules work with most column types including,
Note
These actions are not available in canvas apps:
Note
Scope
Entity scope enables business rules to run on Model-driven app forms and server
All Forms scope enables business rules to run on Model-driven app forms
Create a business rule
Sign in to Power Apps, on the left navigation pane expand Data.
In the list that appears, select Tables.
Open the table you want to create the business rule for (for example, open the Account table), and then select the Business Rules tab.
Select Add business rule.
The business rule designer window opens with a single condition already created for you. Every rule starts with a condition. The business rule takes one or more actions based on that condition.
Add a description, if you want, in the description box in the upper-left corner of the window.
Set the scope from the right-top corner.
By Default a condition is already created. You need to configure it.
Add Actions from the component bar on the ride side.
You can add the following actions
Set column values
Clear column values
Set column requirement levels
Show or hide columns
Enable or disable columns
Validate data and show error messages
Create business recommendations based on business intelligence.
Save and Activate.
Test your business rule in your app.
Points to note
Business rules don't work on canvas apps if scope is 'all forms'
Business rules run on canvas apps if set to 'entity'
Business rules actions like hide/lock doesn't work on canvas apps
Business rules actions like display error only works when the data is being submitted to the Dataverse inside canvas apps
Comments
Post a Comment