Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Switch Case Set Variable not working consistently

(0) ShareShare
ReportReport
Posted on by 16

In one of our workflow, we have switch case statement within do until with set variables that navigates to different case. At times, the Do loop is completed without transfering to case statement.

NoNameOH_0-1593468606121.png

Even though value is what is expected in the Case Statement, some times it's  ending the loop without going to the case statement.

 

This behavior is inconsistent since it works at times. This used to work without any issues and we are seeing this change today; Either when approved or rejected it's not working correct.

 

How do we fix this issue?

  • abm abm Profile Picture
    abm abm 32,265 on at
    Re: Switch Case Set Variable not working consistently

    Hi @NoNameOH 

     

     I haven't tested to confirm it but my best guess is it will timeout. 

     

    You can set timeout in approvals.

     

    https://www.o365dude.com/2018/06/02/timeout-flow-approvals/

     

    Thanks

     

     

  • NoNameOH Profile Picture
    NoNameOH 16 on at
    Re: Switch Case Set Variable not working consistently

    Does it continuously check the do until loop if so, what's the time frame? if the action is not completed within 72 hours , will it time out?

     

    The Do until has a couple of approvals it goes  to next state when the approval in the previous state is complete. So, the Do until has to stay active for 30 days. I was planning to cap to 5000 iterations with timelimit P30D. Should we add delays to every switch/case ? if so, can you recommend some limits.

     

     

     

  • abm abm Profile Picture
    abm abm 32,265 on at
    Re: Switch Case Set Variable not working consistently

    Hi @NoNameOH 

     

    According to this article you can set the maximum of 5000 which is 72 hours.

     

    https://www.sharepointsiren.com/2018/10/approval-flow-with-weekly-reminder-getting-passed-30-day-limit/#:~:text=Flow%20%233%20%E2%80%93%20Weekly%20Reminder&text=By%20Default%2C%20Do%20Until%20Actions,PT270H%20which%20is%2072%20hours.

     

    Thanks

     

     

  • NoNameOH Profile Picture
    NoNameOH 16 on at
    Re: Switch Case Set Variable not working consistently

    What's the max limit that can be set ? This powerautomate runs at the tenant level. Is there any way to prevent it from happenning?

     

  • abm abm Profile Picture
    abm abm 32,265 on at
    Re: Switch Case Set Variable not working consistently

    Hi @NoNameOH 

     

    This could be the timeout of Do until loop which is default to a minute (60 seconds).

     

    https://powerusers.microsoft.com/t5/General-Power-Automate/Do-Until-Need-help-understanding-limits/td-p/371374

     

    There won't be any errors of timeout. It simply skips the Do Until loop and execute the next step after 60 seconds.

     

    Try increasing the limit and see if that works or not.

     

    Thanks

     

    Thanks

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard