Skip to content

Commit 267bf61

Browse files
authored
Merge pull request #10444 from MicrosoftDocs/anshuman-ms-patch-1
added unsupported column types for business rules
2 parents 2ab65e1 + e1ee516 commit 267bf61

File tree

1 file changed

+50
-44
lines changed

1 file changed

+50
-44
lines changed

powerapps-docs/maker/model-driven-apps/create-business-rules-recommendations-apply-logic-form.md

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Create model-driven app business rules and recommendations | MicrosoftDocs"
33
description: Learn how to create a business rule for a specific form in Power Apps
44
ms.custom: ""
5-
ms.date: 06/15/2022
5+
ms.date: 09/10/2024
66
ms.reviewer: ""
77
ms.suite: ""
88
ms.tgt_pltfrm: ""
@@ -14,6 +14,7 @@ applies_to:
1414
ms.assetid: 00e62904-2ce9-4730-a113-02b1fedbf22e
1515
caps.latest.revision: 31
1616
author: "Mattp123"
17+
contributors: anshuman-ms
1718
ms.subservice: mda-maker
1819
ms.author: "matp"
1920
tags:
@@ -23,7 +24,7 @@ search.audienceType:
2324
---
2425
# Create business rules to apply logic in a model-driven app form
2526

26-
Very often it is necessary to add in business logic to ensure that columns in a model-driven app are shown, hidden, or set with the correct values.
27+
Very often it's necessary to add in business logic to ensure that columns in a model-driven app are shown, hidden, or set with the correct values.
2728

2829
This article shows how to create [business rules](model-driven-app-glossary.md#business-rule) and recommendations to apply form logic in a model-driven app without writing JavaScript code or creating plug-ins. Business rules provide a simple interface to implement and maintain fast-changing and commonly used rules. They can be applied to main and quick create forms. Business rules work in model-driven apps, legacy web apps, Dynamics 365 for tablets, and Dynamics 365 for Outlook (online or offline mode).
2930

@@ -48,17 +49,15 @@ By combining conditions and actions, the following actions are possible with bus
4849
>
4950
> Business rules don’t work with multi-select choices.
5051
51-
## View, edit or create a business rule in Power Apps
52+
## View, edit, or create a business rule in Power Apps
5253

53-
1. Sign in to [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
54+
1. Sign in to [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
55+
1. Select **Solutions** on the left navigation pane, open the solution you want, and then open or add the table you want.
56+
1. Select **New**, and then under **Customizations**, select **Business rule**. [!INCLUDE [left-navigation-pane](../../includes/left-navigation-pane.md)]
5457

55-
2. Select **Tables** on the left navigation pane, open the table you want, and then under the **Customizations** area, select **Business rules**. [!INCLUDE [left-navigation-pane](../../includes/left-navigation-pane.md)]
56-
> [!note]
57-
> Customizations to a table take should place within a [solution](../model-driven-apps/model-driven-app-glossary.md#solution). To update a table within a solution, open your solution, and then open the table. Then, under the **Customizations** area, select **Business rules**.
58+
The business rules designer opens. Next step: [Set the business rule properties](#set-the-business-rule-properties)
5859

59-
3. On the command bar, select **New business rule**.
60-
61-
## View, edit or create a business rule in form designer
60+
## View, edit, or create a business rule in form designer
6261

6362
1. On form designer left navigation pane, select **Business rules**.
6463

@@ -75,9 +74,10 @@ When the business rule designer window opens for a new rule, a single condition
7574
:::image type="content" source="media/business-rules-design-window.png" alt-text="Sample model-driven app" lightbox="media/business-rules-design-window.png":::
7675

7776
Enter or select the following properties from the business rule command bar.
77+
7878
1. **Business rule name**: By default, the rule is named *New business rule*. We recommend you enter a meaningful name for the business rule.
7979
1. **Description**: Optionally, add a description.
80-
1. **Scope**: The scope of the business rule determines which forms the business rule will be applied. You set the scope, according to the following:
80+
1. **Scope**: The scope of the business rule determines which forms the business rule will be applied. You set the scope, according to these options:
8181

8282
:::row:::
8383
:::row-end:::
@@ -121,107 +121,113 @@ Enter or select the following properties from the business rule command bar.
121121

122122
1. **Add conditions.** To add more conditions to your business rule:
123123

124-
1. Drag the **Condition** component from the **Components** tab to a plus sign in the designer.
124+
1. Drag the **Condition** component from the **Components** tab to a plus sign in the designer.
125125

126126
![Add a condition in a business rule.](media/add-condition-business-rule.png "Add a condition in a business rule")
127127

128-
2. To set properties for the condition, select the **Condition** component in the designer window, and then set the properties in the **Properties** tab on the right side of the screen. As properties are set, an expression is created at the bottom of the **Properties** tab.
128+
2. To set properties for the condition, select the **Condition** component in the designer window, and then set the properties in the **Properties** tab on the right side of the screen. As properties are set, an expression is created at the bottom of the **Properties** tab.
129129

130-
3. To add an additional clause (an AND or OR) to the condition, select **New** in the **Properties** tab to create a new rule, and then set the properties for that rule. In the **Rule Logic** column, you can specify whether to add the new rule as an AND or an OR.
130+
3. To add an additional clause (an AND or OR) to the condition, select **New** in the **Properties** tab to create a new rule, and then set the properties for that rule. In the **Rule Logic** column, you can specify whether to add the new rule as an AND or an OR.
131131

132132
![Add a new rule to a condition.](media/add-new-rule-condition.png "Add a new rule to a condition")
133133

134-
4. Once finished setting properties for the condition, select **Apply**.
134+
4. Once finished setting properties for the condition, select **Apply**.
135135

136-
4. **Add actions.** To add an action:
136+
2. **Add actions.** To add an action:
137137

138-
1. Drag one of the action components from the **Components** tab to a plus sign next to **Condition** component. Drag the action to a plus sign next to a check mark if you want the business rule to take that action when the condition is met, or to a plus sign next to an x if you want the business rule to take that action if the condition is not met.
138+
1. Drag one of the action components from the **Components** tab to a plus sign next to **Condition** component. Drag the action to a plus sign next to a check mark if you want the business rule to take that action when the condition is met, or to a plus sign next to an x if you want the business rule to take that action if the condition isn't met.
139139

140140
![Drag an action to a business rule.](media/drag-an-action-business-rule.png "Drag an action to a business rule")
141141

142142
2. To set properties for the action, select the **Action** component in the designer window, and then set the properties in the **Properties** tab.
143143

144144
3. When finished setting properties, select **Apply**.
145145

146-
5. **Add a business recommendation.** To add a business recommendation:
146+
3. **Add a business recommendation.** To add a business recommendation:
147147

148-
1. Drag the **Recommendation** component from the **Components** tab to a plus sign next to a **Condition** component. Drag the **Recommendation** component to a plus sign next to a check mark if you want the business rule to take that action when the condition is met, or to a plus sign next to an x if you want the business rule to take that action if the condition is not met.
148+
1. Drag the **Recommendation** component from the **Components** tab to a plus sign next to a **Condition** component. Drag the **Recommendation** component to a plus sign next to a check mark if you want the business rule to take that action when the condition is met, or to a plus sign next to an x if you want the business rule to take that action if the condition isn't met.
149149

150-
2. To set properties for the recommendation, select the **Recommendation** component in the designer window, and then set the properties in the **Properties** tab.
150+
2. To set properties for the recommendation, select the **Recommendation** component in the designer window, and then set the properties in the **Properties** tab.
151151

152-
3. To add more actions to the recommendation, drag them from the **Components** tab, and then set properties for each action in the **Properties** tab.
152+
3. To add more actions to the recommendation, drag them from the **Components** tab, and then set properties for each action in the **Properties** tab.
153153

154-
> [!NOTE]
155-
> When you create a recommendation, a single action is added by default. To see all the actions in a recommendation, select **Details** on the **Recommendation** component.
154+
> [!NOTE]
155+
> When you create a recommendation, a single action is added by default. To see all the actions in a recommendation, select **Details** on the **Recommendation** component.
156156
157-
4. When you're finished setting properties, select **Apply**.
157+
4. When you're finished setting properties, select **Apply**.
158158

159-
6. To validate the business rule, select **Validate** on the action bar.
159+
4. To validate the business rule, select **Validate** on the action bar.
160160

161-
7. To save the business rule, select **Save** on the action bar.
161+
5. To save the business rule, select **Save** on the action bar.
162162

163-
8. To activate the business rule, select it in the Solution Explorer window, and then select **Activate**. It is not possible to activate the business rule from the designer window.
163+
6. To activate the business rule, select it in the Solution Explorer window, and then select **Activate**. It isn't possible to activate the business rule from the designer window.
164164

165165
> [!TIP]
166-
> Here are a few tips to keep in mind as you work on business rules in the designer window:
167-
>
168-
> - To take a snapshot of everything in the Business Rule window, select **Snapshot** on the action bar. This is useful, for example, when getting feedback from team members.
166+
> Here are a few tips to keep in mind as you work on business rules in the designer window:
167+
>
168+
> - To take a snapshot of everything in the **Business Rule** window, select **Snapshot** on the action bar. This is useful, for example, when getting feedback from team members.
169169
> - Use the mini-map to navigate quickly to different parts of the process. This is useful when working on a complicated process that scrolls off the screen.
170170
> - As you add conditions, actions, and business recommendations to your business rule, code for the business rule is built and appears at the bottom of the designer window. This code is read-only.
171171
172-
<a name="BKMK_LocalizingErrorMessages"></a>
173172
## Localize error messages used in business rules
174173

175-
If more than one language is provisioned for your environment, it is worth localizing any error messages that have been set. Each time a message is set, a label is generated by the system. If the translations in your environment are set, localized versions of your messages can be added and then imported back into the system. This enables people using languages other than your base language to view the translated messages.
174+
If more than one language is provisioned for your environment, it's worth localizing any error messages that are set. Each time a message is set, a label is generated by the system. If the translations in your environment are set, localized versions of your messages can be added and then imported back into the system. This enables people using languages other than your base language to view the translated messages.
176175

177176
## Common issues
178177

179-
This section describes common issues that may occur when you use business rules.
178+
This section describes common issues that might occur when you use business rules.
180179

181180
### Full Name column and Address column not supported with Unified Interface apps
182181

183-
Actions or conditions that use a composite column like the **Full Name** (fullname) column or an **Address** column aren't supported in apps based on Unified Interface. Alternatively, you can use actions or conditions with the constituent columns. For example, for the **Full Name** column, you can use actions or conditions on the **First Name** (firstname) and **Last Name** (lastname) columns.
182+
Actions or conditions that use a composite column like the **Full Name** `fullname` column or an **Address** column aren't supported in apps based on Unified Interface. Alternatively, you can use actions or conditions with the constituent columns. For example, for the **Full Name** column, you can use actions or conditions on the **First Name** (firstname) and **Last Name** (lastname) columns.
184183

185184
### Business rules don't execute for some users
186185

187186
Make sure that users have a security role that includes, at a minimum, user scope read privileges on the Process table. By default, the Basic User security role has this privilege.
188187

189188
### Business rules don't fire on editable grid on a dashboard
190189

191-
Entity scoped business rules will not fire on an editable grid when the editable grid is configured on a dashboard page.
190+
Entity scoped business rules won't fire on an editable grid when the editable grid is configured on a dashboard page.
192191

193192
### Is the business rule not firing for a form?
194193

195-
A business rule may not execute because the column referenced in the business rule isn't included with the form.
194+
A business rule might not execute because the column referenced in the business rule isn't included with the form.
195+
196196
1. Open solution explorer. Expand the table that you want, and then select **Forms**.
197-
2. Open the form, and then on the form designer ribbon select **Business Rules**.
198-
3. In the form designer, open the business rule.
199-
4. In the business rule designer, select each condition and action to verify all the columns referenced in each condition and action.
197+
1. Open the form, and then on the form designer ribbon select **Business Rules**.
198+
1. In the form designer, open the business rule.
199+
1. In the business rule designer, select each condition and action to verify all the columns referenced in each condition and action.
200200

201201
> [!div class="mx-imgBorder"]
202202
> ![Field referenced in business rule exists in table.](media/business-rule-field.png "Field referenced in business rule exists in table")
203203
204-
5. Verify that each column referenced in the business rule is also included on the form. If not, add the missing column to the form.
204+
1. Verify that each column referenced in the business rule is also included on the form. If not, add the missing column to the form.
205205

206206
> [!div class="mx-imgBorder"]
207207
> ![Account name column on form.](media/account-name-on-form.png "Account name column on form")
208208
209-
A business rule may also not execute because a column referenced in the business rule is a composite column. The constituent columns of the composite column can be used instead.
209+
A business rule might also not execute because a column referenced in the business rule is a composite column. The constituent columns of the composite column can be used instead.
210+
211+
### Unsupported column types
212+
213+
Columns of type unique identifier and rollup columns aren't supported with business rules.
214+
215+
There are a few special columns which support localizable values, such as the **Name** column for the **Product** table that's included with Dynamics 365 for Sales apps. Columns that support localizable values aren't supported with business rules.
210216

211217
## Frequently asked questions (FAQ)
212218

213219
*Can business rules unlock columns on a read-only form?*
214220
- Yes, a business rule can unlock columns and edit actions on a read-only form.
215221

216222
*How do I troubleshoot a business rule that isn't working?*
217-
- See [Is your business rule not firing for a form?](create-business-rules-recommendations-apply-logic-form.md#is-the-business-rule-not-firing-for-a-form) in this topic.
223+
- See [Is your business rule not firing for a form?](create-business-rules-recommendations-apply-logic-form.md#is-the-business-rule-not-firing-for-a-form) in this article.
218224

219225
*What do recommendations look like within a form?*
220226

221-
Recommendations show a lightbulb next to the column label.
227+
Recommendations show a light bulb next to the column label.
222228
- ![Business rule collapsed.](media/recommendation-view1.png "Recommendation lightbulb collapsed")
223229

224-
Select the lightbulb to expand the view and show the recommendation.
230+
Select the light bulb to expand the view and show the recommendation.
225231
- ![Business rule expanded.](media/recommendation-view2.png "Recommendation lightbulb expanded")
226232

227233
## See also

0 commit comments

Comments
 (0)