Home » The war of the loops…

The war of the loops…

While Apply to Each and Do Until are both powerful features in Power Automate, there are specific scenarios where Do Until would work more efficiently than Apply to Each.

Do Until is particularly useful when there is a need to repeatedly perform a set of actions until a specific condition is met. This is especially relevant when dealing with dynamic data, such as information that is updated frequently and is subject to change. For example, if you need to check a data set for available appointment times and schedule an appointment only if one is available, the Do Until loop can be used to repeatedly check the data, or website, until an available time slot is found.

Do Until is also helpful when there is a need to perform a sequence of actions based on a specific set of conditions. For instance, if a business needs to track the status of a customer’s order until it is completed, the Do Until loop can be used to check the status of the order, send follow-up emails, and perform other actions until the order is fulfilled. In contrast, Apply to Each may not be suitable for this scenario since it would only perform the same set of actions for each item in a collection, without accounting for the specific conditions or status of the order.

Do Until can also be used when there is a need to perform a set of actions until a specific value or result is achieved. This can be particularly useful when dealing with complex calculations or operations that require multiple steps. For example, if you need to process a large amount of data and perform a series of calculations on each record until a specific result is obtained, the Do Until loop can be used to repeatedly perform the calculations until the desired result is achieved.

In contrast, Apply to Each is suitable when there is a need to perform the same set of actions for multiple items within a collection. This feature is particularly useful when working with static data, such as a list of customers or products, where the same set of actions can be performed on each item in the list.

In summary, while both Apply to Each and Do Until are powerful features in Power Automate, you should evaluate the specific conditions and requirements of your workflows before deciding on the appropriate feature to use.

PhilGlew-Deval

Back to top