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-control-flow-loops.md
+34-7Lines changed: 34 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,6 @@ ms.suite: integration
6
6
ms.reviewer: estfan, azla
7
7
ms.topic: how-to
8
8
ms.date: 09/13/2023
9
-
ms.custom:
10
-
- build-2025
11
9
---
12
10
13
11
# Add loops to repeat actions in workflows for Azure Logic Apps
@@ -240,12 +238,41 @@ The following list contains some common scenarios where you can use an **Until**
240
238
241
239
* Create a record in a database. Wait until a specific field in that record gets approved. Continue processing.
242
240
243
-
In the following example workflow, starting at 8:00 AM each day, the **Until**action increments a variable until the variable's value equals 10. The workflow then sends an email that confirms the current value.
241
+
By default, the **Until**loop succeeds or fails in the following ways:
244
242
245
-
> [!NOTE]
246
-
>
247
-
> This example uses Office 365 Outlook, but you can use [any email provider that Azure Logic Apps supports](/connectors/).
248
-
> If you use another email account, the general steps stay the same, but your UI might look slightly different.
243
+
- The **Until** loop succeeds if all the actions inside the loop succeed, and if the loop limit is reached, based on the run after behavior.
244
+
245
+
- If all actions in last iteration of the **Until** loop succeed, the entire **Until** loop is marked as **Succeeded**.
246
+
247
+
- If any action fails in the last iteration of the **Until** loop, the entire **Until** loop is marked as **Failed**.
248
+
249
+
- If any action fails in an iteration other than the last iteration, the next iteration continues to run, and the entire **Until** loop isn't marked as **Failed**.
250
+
251
+
To make the loop fail instead, you can change the default behavior in the loop's JSON definition by adding the parameter named **`operationOptions`**, and setting the value to **`FailWhenLimitsReached`**, for example:
In the following example workflow, starting at 8:00 AM each day, the **Until** action increments a variable until the variable's value equals 10. The workflow then sends an email that confirms the current value. The example uses Office 365 Outlook, but you can use [any email provider that Azure Logic Apps supports](/connectors/). If you use another email account, the general steps stay the same, but your UI might look slightly different.
0 commit comments