You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
16
16
17
17
For example, suppose you have a workflow that sends too many emails when new items appear on a website's RSS feed.
18
18
You can add the **Condition** action to send email only when the new item includes a specific word.
19
19
20
20
> [!NOTE]
21
21
>
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
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.
26
27
27
28
## Prerequisites
28
29
@@ -36,39 +37,39 @@ This how-to guide shows how to add a condition to your workflow and use the resu
36
37
37
38
### [Consumption](#tab/consumption)
38
39
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.
40
41
41
42
1.[Follow these general steps to add the **Condition** action to your workflow](create-workflow-with-trigger-or-action.md?tabs=consumption#add-action).
42
43
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:
44
45
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.
46
47
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.
48
49
49
50
This example selects the RSS trigger output named **Feed summary**.
50
51
51
52

52
53
53
-
1.From the middle list, select the operation to perform.
54
+
1.Open the middle list, select the operation to perform.
54
55
55
56
This example selects **contains**.
56
57
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.
58
59
59
60
This example specifies the following string: **Microsoft**
60
61
61
-
The following example shows the complete condition:
62
+
The complete condition now looks like the following example:
62
63
63
64

64
65
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**.
66
67
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**.
68
69
69
70
- To group existing rows, select the checkboxes for those rows, select the ellipses (...) button for any row, and then select **Make group**.
70
71
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:
72
73
73
74

74
75
@@ -80,13 +81,19 @@ This how-to guide shows how to add a condition to your workflow and use the resu
80
81
81
82
### [Standard](#tab/standard)
82
83
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.
84
85
85
86
1.[Follow these general steps to add the **Condition** action to your workflow](create-workflow-with-trigger-or-action.md?tabs=standard#add-action).
86
87
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.
88
95
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.
90
97
91
98

92
99
@@ -98,21 +105,21 @@ This how-to guide shows how to add a condition to your workflow and use the resu
98
105
99
106
This example selects **contains**.
100
107
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.
102
109
103
110
This example specifies the following string: **Microsoft**
104
111
105
112
The following example shows the complete condition:
106
113
107
114

108
115
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**.
110
117
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**.
112
119
113
120
- To group existing rows, select the checkboxes for those rows, select the ellipses (...) button for any row, and then select **Make Group**.
114
121
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:
116
123
117
124

118
125
@@ -128,7 +135,7 @@ This workflow now sends mail only when the new items in the RSS feed meet your c
128
135
129
136
## JSON definition
130
137
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).
132
139
133
140
```json
134
141
"actions": {
@@ -165,4 +172,4 @@ The following shows the high-level code definition behind the **Condition** acti
165
172
*[Run steps based on different values (switch actions)](logic-apps-control-flow-switch-statement.md)
166
173
*[Run and repeat steps (loops)](logic-apps-control-flow-loops.md)
167
174
*[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