Skip to main content

Notifications

Power Platform Community / Forums / Building Flows / Switch case actions be...
Building Flows
Suggested answer

Switch case actions being skipped

Posted on by 12
I am using a switch case which passes approvals between individuals depending on a "status" variable. The approvals are sequential, however each approver can reject and request revisions from 1 of 2 people. This is why I created the switch case, to facilitate passing documents back and forth between people. The switch case leaves the "Do Until" loop when the status variable is changed to "Complete" after the final person has approved the documents.
 
Step 1: IM Approval Requested
This switch case executes successfully. The last step is that the "status" variable is updated - in this case the approval outcome was "approved" so the status variable was set to "AM Approval Requested". 
 
 
 
Step 2: AM Approval Requested
Because the previous case was approved, the case changes to "AM Approval" 
 
The problem is that the first action starts and ends before the status variable is redefined, and the case is switched. Notice that the start and end time for this step is 2:33:59 - 2:34:00 PM, but the end time for the previous step was 6:30:54 PM.
How can I stop the approvals from skipping? Instead they should wait until the switch case is changed...
  • Suggested answer
    kl13 Profile Picture
    kl13 12 on at
    Switch case actions being skipped
    I think the issue may have been that the larger "Do Until" loop that the entire switch case lives inside of timed out after an hour. I updated this to last 30 days (as an overconservative precaution). I'm hoping this works and plan to test it out soon...
  • Suggested answer
    Switch case actions being skipped
    Hi.
    After the status variable is updated to "AM Approval Requested," add a Do Until loop to check if the status is equal to "AM Approval Requested."
    Once the status matches the expected value, exit the loop.

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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,065

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,407

Leaderboard

Featured topics