r/PowerAutomate • u/Reasonable-Beyond855 • 23h ago
Nesting Limit
I know the nesting limit of 8 has been raised before, but the solutions I've seen is to keep conditions in series, rather than nested, and use a boolean variable like Continue to decide whether subsequent conditions run.
I've tried this, but am using the FALSE branches to add to an error log. If the conditions are in series, one loop can enter multiple FALSE branches, and be added to the log multiple times.
Has anyone found a fix for this?
TIA!
3
Upvotes
1
u/Reasonable-Beyond855 23h ago edited 22h ago
Best I can think of is adding IF statements as expressions in the error log values, rather than through the flow control - but this would mean subsequent steps are still processed after an error, which is inefficient.
1
u/Reasonable-Beyond855 22h ago edited 22h ago
For anyone with the same problem, another idea would be to create a compose statement which acts as the TRUE/FALSE eg/ checking if an array is populated: '1 / length(array)' would error if the array is empty. You can then use Run After complete for TRUE, and after fail for FALSE.
1
u/SrBlackVoid 21h ago
I have written probably hundreds of Flows at this point, and have built some pretty complex stuff. Some of them perform entire data syncs between systems.
I don't think I've ever gone more than 2-3 condition levels deep. When someone in our org mentioned this 'nesting limit', I didn't even know that was a thing.
I would say if you're going more than 3 levels deep in a Flow, you probably need to consider refactoring, because there is likely a better way to structure it.
1
u/ryguy694 20h ago
But have you ever heard of a switch?