Skip to content

Commit da329b8

Browse files
authored
Merge pull request #248901 from ecfan/ecfan-patch-1
Azure Logic Apps: Conditions - Clarity edits
2 parents 29c3268 + a8538e4 commit da329b8

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

articles/logic-apps/logic-apps-control-flow-conditional-statement.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Add conditions to workflows
3-
description: Create conditions that control actions in workflows in Azure Logic Apps.
3+
description: Create conditions that control workflow actions in Azure Logic Apps.
44
services: logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, azla
@@ -12,17 +12,18 @@ ms.date: 08/08/2023
1212

1313
[!INCLUDE [logic-apps-sku-consumption-standard](../../includes/logic-apps-sku-consumption-standard.md)]
1414

15-
To specify a condition that returns either true or false and have your workflow run either one action path or another based on the result, add the **Control** action named **Condition** to your workflow. You can nest conditions inside each other.
15+
When you want to set up a condition that returns true or false and have the result determine whether your workflow runs one path of actions or another, add the **Control** action named **Condition** to your workflow. You can also nest conditions inside each other.
1616

1717
For example, suppose you have a workflow that sends too many emails when new items appear on a website's RSS feed.
1818
You can add the **Condition** action to send email only when the new item includes a specific word.
1919

2020
> [!NOTE]
2121
>
22-
> To specify more than two paths from which your workflow can choose or if the condition criteria isn't restricted
23-
> to only true or false, use a [*switch statement* instead](logic-apps-control-flow-switch-statement.md).
22+
> If you want to specify more than two paths from which your workflow can choose
23+
> or condition criteria that's not restricted to only true or false, use a
24+
> [*switch action* instead](logic-apps-control-flow-switch-statement.md).
2425
25-
This how-to guide shows how to add a condition to your workflow and use the result to help your workflow choose from two action paths.
26+
This guide shows how to add a condition to your workflow and use the result to help your workflow choose between two action paths.
2627

2728
## Prerequisites
2829

@@ -36,39 +37,39 @@ This how-to guide shows how to add a condition to your workflow and use the resu
3637

3738
### [Consumption](#tab/consumption)
3839

39-
1. In the [Azure portal](https://portal.azure.com), open your Consumption logic app workflow in the designer.
40+
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
4041

4142
1. [Follow these general steps to add the **Condition** action to your workflow](create-workflow-with-trigger-or-action.md?tabs=consumption#add-action).
4243

43-
1. In the **Condition** action, follow these steps build your condition:
44+
1. In the **Condition** action, follow these steps to build your condition:
4445

45-
1. In the left **Choose a value** box, specify the first value or field that you want to compare.
46+
1. In the left-side box named **Choose a value**, enter the first value or field that you want to compare.
4647

47-
When you select inside the left box, the dynamic content list opens so that you can select outputs from previous steps in your workflow.
48+
When you select inside the **Choose a value** box, the dynamic content list opens automatically. From this list, you can select outputs from previous steps in your workflow.
4849

4950
This example selects the RSS trigger output named **Feed summary**.
5051

5152
![Screenshot shows Azure portal, Consumption workflow designer. RSS trigger, and Condition action with criteria construction.](./media/logic-apps-control-flow-conditional-statement/edit-condition-consumption.png)
5253

53-
1. From the middle list, select the operation to perform.
54+
1. Open the middle list, select the operation to perform.
5455

5556
This example selects **contains**.
5657

57-
1. In the right **Choose a value** box, specify the value or field that you want to compare with the first.
58+
1. In the right-side box named **Choose a value**, enter the value or field that you want to compare with the first.
5859

5960
This example specifies the following string: **Microsoft**
6061

61-
The following example shows the complete condition:
62+
The complete condition now looks like the following example:
6263

6364
![Screenshot shows the Consumption workflow and the complete condition criteria.](./media/logic-apps-control-flow-conditional-statement/complete-condition-consumption.png)
6465

65-
- To add another row to your condition, open the **Add** menu, and select **Add row**.
66+
- To add another row to your condition, from the **Add** menu, select **Add row**.
6667

67-
- To add a group with subconditions, open the **Add** menu, and select **Add group**.
68+
- To add a group with subconditions, from the **Add** menu, select **Add group**.
6869

6970
- To group existing rows, select the checkboxes for those rows, select the ellipses (...) button for any row, and then select **Make group**.
7071

71-
1. In the **True** and **False** action paths, add the actions to run based on whether the condition is true or false, respectively, for example:
72+
1. In the **True** and **False** action paths, add the actions that you want to run, based on whether the condition is true or false respectively, for example:
7273

7374
![Screenshot shows the Consumption workflow and the condition with true and false paths.](./media/logic-apps-control-flow-conditional-statement/condition-true-false-path-consumption.png)
7475

@@ -80,13 +81,19 @@ This how-to guide shows how to add a condition to your workflow and use the resu
8081

8182
### [Standard](#tab/standard)
8283

83-
1. In the [Azure portal](https://portal.azure.com), open your Standard logic app workflow in the designer.
84+
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
8485

8586
1. [Follow these general steps to add the **Condition** action to your workflow](create-workflow-with-trigger-or-action.md?tabs=standard#add-action).
8687

87-
1. On the designer, select the **Condition** action to open the information pane and follow these steps build your condition:
88+
1. On the designer, select the **Condition** action to open the information pane. Follow these steps to build your condition:
89+
90+
1. In the left-side box named **Choose a value**, enter the first value or field that you want to compare.
91+
92+
After you select inside the **Choose a value** box, the options to open the dynamic content list (lightning icon) or expression editor (formula icon) appear.
93+
94+
1. Select the lightning icon to open the dynamic content list.
8895

89-
1. In the left **Choose a value** box, specify the first value or field that you want to compare. When you select inside the left box, select the lightning button that appears to open the dynamic content list so that you can select outputs from previous steps in your workflow.
96+
From this list, you can select outputs from previous steps in your workflow.
9097

9198
![Screenshot shows Azure portal, Standard workflow designer, RSS trigger, and Condition action with information pane open, and dynamic content button selected.](./media/logic-apps-control-flow-conditional-statement/open-dynamic-content-standard.png)
9299

@@ -98,21 +105,21 @@ This how-to guide shows how to add a condition to your workflow and use the resu
98105

99106
This example selects **contains**.
100107

101-
1. In the right **Choose a value** box, specify the value or field that you want to compare with the first.
108+
1. In the right-side box named **Choose a value**, enter the value or field that you want to compare with the first.
102109

103110
This example specifies the following string: **Microsoft**
104111

105112
The following example shows the complete condition:
106113

107114
![Screenshot shows the Standard workflow and the complete condition criteria.](./media/logic-apps-control-flow-conditional-statement/complete-condition-standard.png)
108115

109-
- To add another row to your condition, open the **New item** menu, and select **Add Row**.
116+
- To add another row to your condition, from the **New item** menu, select **Add Row**.
110117

111-
- To add a group with subconditions, open the **New item** menu, and select **Add Group**.
118+
- To add a group with subconditions, from the **New item** menu, select **Add Group**.
112119

113120
- To group existing rows, select the checkboxes for those rows, select the ellipses (...) button for any row, and then select **Make Group**.
114121

115-
1. In the **True** and **False** action paths, add the actions to run based on whether the condition is true or false, respectively, for example:
122+
1. In the **True** and **False** action paths, add the actions to run, based on whether the condition is true or false respectively, for example:
116123

117124
![Screenshot shows the Standard workflow and the condition with true and false paths.](./media/logic-apps-control-flow-conditional-statement/condition-true-false-path-standard.png)
118125

@@ -128,7 +135,7 @@ This workflow now sends mail only when the new items in the RSS feed meet your c
128135

129136
## JSON definition
130137

131-
The following shows the high-level code definition behind the **Condition** action, but for the full definition, see [If action - Schema reference guide for trigger and action types in Azure Logic Apps](logic-apps-workflow-actions-triggers.md#if-action).
138+
The following code shows the high-level JSON definition for the **Condition** action. For the full definition, see [If action - Schema reference guide for trigger and action types in Azure Logic Apps](logic-apps-workflow-actions-triggers.md#if-action).
132139

133140
``` json
134141
"actions": {
@@ -165,4 +172,4 @@ The following shows the high-level code definition behind the **Condition** acti
165172
* [Run steps based on different values (switch actions)](logic-apps-control-flow-switch-statement.md)
166173
* [Run and repeat steps (loops)](logic-apps-control-flow-loops.md)
167174
* [Run or merge parallel steps (branches)](logic-apps-control-flow-branches.md)
168-
* [Run steps based on grouped action status (scopes)](logic-apps-control-flow-run-steps-group-scopes.md)
175+
* [Run steps based on grouped action status (scopes)](logic-apps-control-flow-run-steps-group-scopes.md)

0 commit comments

Comments
 (0)