How to stop infinite loop in Power Automate using Multiple lines of text
We have previously discussed how to stop infinite flow using CSOM update, flag column with form and modified by column, By the way, in this method we can do from the workflow itself even if we don’t have a customized form and it will be much easier than the uglier CSOM HTTP request.
First we will create a multiple lines of text column and set “Yes” to Append changes to existing text option.
Select Advanced settings and Set “Yes” to Allow Management of content types
It will enable the “Item” content type in the list settings, Select the “MultiLineFlag” column and set it to Hidden.
Change the Allow management of content type to No again.
Append change to existing text will automatically create a version history on that list, whenever a change is made to the item if the “MultiLineFlag” column is not updated it will update as an empty value.
We can use the Update Item action and update the “MultiLineFlag” to some value.
Open the Menu of trigger action and add trigger condition
We are triggering the flow when the “MultiLineFlag” has no value otherwise it will not trigger.
When the item is updated from the form since the “MultiLineFlag” is hidden it will be updated as an empty value and the flow will trigger and in the workflow, we are updating the “MultiLineFlag” to some value so the workflow will not trigger.
Let’s test with a record, we are updating the item, the MultiLineFlag is updated as empty as shown below and the flow is triggered.
The flow will update the “MultiLineFlag” as “Workflow Update” so the workflow will not trigger.
In some cases we are not allowed to create new columns in our environment at that time we have to rely on CSOM update otherwise this method will be the simpler way to handle the infinite loop.
Please post your queries in the comment section. Happy Building 🙂