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
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-use-logic-app-features.md
+87-50Lines changed: 87 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Add conditional logic and start workflows - Azure Logic Apps | Microsoft Docs
2
+
title: Add conditions and start workflows - Azure Logic Apps | Microsoft Docs
3
3
description: Control how workflows run in Azure Logic Apps by adding conditional logic, triggers, actions, and parameters.
4
4
author: stepsic-microsoft-com
5
5
manager: anneta
@@ -18,54 +18,86 @@ ms.author: LADocs; stepsic
18
18
19
19
---
20
20
# Use Logic Apps features
21
-
In the [previous topic](../logic-apps/logic-apps-create-a-logic-app.md),
22
-
you created your first logic app.
23
-
Now you'll build a fuller process with Azure Logic Apps.
24
-
This topic introduces the following new Azure Logic Apps concepts:
25
21
26
-
* Conditional logic, which executes an action only when a certain condition is met.
27
-
* Code view to edit an existing logic app.
28
-
* Options for starting a workflow.
22
+
In a [previous topic](../logic-apps/logic-apps-create-a-logic-app.md),
23
+
you created your first logic app. To control your logic app's workflow,
24
+
you can specify different paths for your logic app to run and how to
25
+
process data in arrays, collections, and batches. You can include these
26
+
elements in your logic app workflow:
29
27
30
-
Before you complete this topic, you should complete the steps in [Create a new logic app](../logic-apps/logic-apps-create-a-logic-app.md). In the [Azure portal], browse to your logic app and click **Triggers and Actions** in the summary to edit the logic app definition.
28
+
* Conditions and [switch statements](../logic-apps/logic-apps-switch-case.md)
29
+
let your logic app run different actions based on whether specific conditions are met.
31
30
32
-
## Reference material
33
-
You may find the following documents useful:
31
+
*[Loops](../logic-apps/logic-apps-loops-and-scopes.md) let your logic app run steps repeatedly.
32
+
For example, you can repeat actions over an array when you use a **For_each** loop.
33
+
Or you can repeat actions until a condition is met when you use an **Until** loop.
34
34
35
-
*[Management and runtime REST APIs](https://msdn.microsoft.com/library/azure/mt643787.aspx) - including how to invoke Logic apps directly
36
-
*[Language reference](https://msdn.microsoft.com/library/azure/mt643789.aspx) - a comprehensive list of all supported functions/expressions
37
-
*[Trigger and action types](https://msdn.microsoft.com/library/azure/mt643939.aspx) - the different types of actions and the inputs they take
38
-
*[Overview of App Service](../app-service/app-service-value-prop-what-is.md) - description of what components to choose when to build a solution
35
+
*[Scopes](../logic-apps/logic-apps-loops-and-scopes.md) let you group series
36
+
of actions together, for example, to implement exception handling.
39
37
40
-
## Add conditional logic to your logic app
38
+
*[Debatching](../logic-apps/logic-apps-loops-and-scopes.md) lets your logic app
39
+
start separate workflows for items in an array when you use the **SplitOn** command.
41
40
42
-
Although your logic app's original flow works, we could improve some areas.
41
+
This topic introduces other concepts for building your logic app:
43
42
44
-
### Conditional
43
+
* Code view to edit an existing logic app
44
+
* Options for starting a workflow
45
45
46
-
Your first logic app might result in you getting too many emails.
47
-
The following steps add conditional logic so that you receive email
48
-
only when the tweet comes from someone with a specific number of followers.
46
+
## Conditions: Run steps only after meeting a condition
49
47
50
-
0. In the Logic App Designer, choose **New Step** (+) > **Add an action**.
51
-
0. Find and add the **Get User** action for Twitter.
52
-
0. To get the information about the Twitter user,
53
-
find and add the **Tweeted by** field from the trigger.
48
+
To have your logic app run steps only when data meets specific criteria,
49
+
you can add a condition that compares data in the workflow against specific fields or values.
> To define the condition in code, choose **Edit in advanced mode**.
84
+
> For example:
85
+
>
86
+
> 
87
+
88
+
4. Under **IF YES** and **IF NO**, add the steps to perform based
89
+
on whether the condition is met.
90
+
91
+
For example:
92
+
93
+

94
+
95
+
> [!TIP]
96
+
> You can drag existing actions into the **IF YES** and **IF NO** paths.
97
+
98
+
5. When you're done, save your logic app.
99
+
100
+
Now you get emails only when the posts meet your condition.
69
101
70
102
## Repeat actions over a list with forEach
71
103
@@ -94,7 +126,7 @@ you can directly edit the code that defines a logic app.
94
126
95
127
2. To save your edits, choose **Save**.
96
128
97
-
###Parameters
129
+
## Parameters
98
130
99
131
Some Logic Apps capabilities are available only in code view,
100
132
for example, parameters. Parameters make it easy to reuse
@@ -103,35 +135,34 @@ an email address that you want use in several actions,
103
135
you should define that email address as a parameter.
104
136
105
137
Parameters are good for pulling out values that you are likely to change a lot.
106
-
They are especially useful when you need to override parameters in different environments.
107
-
To learn how to override parameters based on environment,
108
-
see the [REST API documentation](https://docs.microsoft.com/rest/api/logic).
138
+
They are especially useful when you need to override parameters in different environments. To learn how to override parameters based on environment,
139
+
see [Author logic app definitions](../logic-apps/logic-apps-author-definitions.md) and [REST API documentation](https://docs.microsoft.com/rest/api/logic).
109
140
110
141
This example shows how to update your existing logic app
111
142
so that you can use parameters for the query term.
112
143
113
144
1. In code view, find the `parameters : {}` object,
0 commit comments