cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Switch case stops working part way

Hi, 

 

I've created an Flow for a sharepoint list to work as a state machine and works through the following stages triggered on the following Status drop-down value.

 

Pending

1st Approver

2nd Approver

Approved

 

The workflow is set to run when the list item  is modified and fire an email to an admin to update a form and request approval. I've set a control on the form to return to admin if an approver needs to request more information prior to approving.Capture.PNG

 

Fir example if 2nd approver requests more info then the status changes to Pending and the admin receives an email, Once the information is supplied and the admin re-assigns to the 2nd approver nothing happens. The flow does not repeat and fire a new email to the 2nd approver, the only function that works is for the 2nd Approver to click approve, its the same for the 1st Approver.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Switch case stops working part way

Hi @Anonymous,

 

Could you please share about the field type of the 

Pending

1st Approver

2nd Approver

Approved

Status field?

If it is a Choice field, currently it is not available for Microsoft Flow to Update its value, there is an idea submitted on this already:

SharePoint - Update Item Choice Field

 

Please consider switch this field into single line of Text type, if it is the Choice type.

 

Besides, would you please share the Flow running details here? In which step it stops working?

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Switch case stops working part way

Hi Michael, 

 

I stumbled on a fix for this yesterday and have managed to replicate and simplify my old state machine workflow. I used the template - "When an existing list item is modified, complete a custom action"

 

Now when a condition is based on a Yes/No column if for example "1st Approval" is equal to "No" - equates to an expression - "bool('false')"

 

The workflow triggers everytime an approver responds or rejects 

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Switch case stops working part way

Hi @Anonymous,

 

Could you please share about the field type of the 

Pending

1st Approver

2nd Approver

Approved

Status field?

If it is a Choice field, currently it is not available for Microsoft Flow to Update its value, there is an idea submitted on this already:

SharePoint - Update Item Choice Field

 

Please consider switch this field into single line of Text type, if it is the Choice type.

 

Besides, would you please share the Flow running details here? In which step it stops working?

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Switch case stops working part way

Hi Michael, 


Thanks for the reply, the field type is indeed a choice field however the update is done from within the form.

 

The issue here is that the flow is set to run whenever an item is modified hence the different cases. Below is a more detailed description of the form function - 

 

Step 1 form is completed by an assistant and 1st Approver option is selected and the status changes to 1st Approver

 

The workflow triggers and sends the email to a manager with a link to the form, if all is well the form is approved and status is set to 2nd Approver. The workflow triggers  and an email is sent to a director.

 

If more info is required then the option for return to assistant is clicked and status changes back to pending. The workflow triggers and an email is sent to the assistant requesting more info. 

 

Once the assistant adds relevant info and clicks 1st Approver again, the status is changed to 1st Approver, however the workflow fails to trigger and no email is sent. There is one point to note - the workflow will only trigger if the manager (1st Approver)  clicks the 2nd Approver button.

 

Same scenario with the 2nd approver, if they click to return to assistant then status changes back to pending. The workflow triggers and an email is sent to the assistant requesting more info.  However the workflow will not trigger if the assistant clicks the 2nd Approver button. But the workflow triggers if the Director (2nd Approver) clicks approved.

 

I hope this makes sense to you.

 

Thanks

Chet

Highlighted
Anonymous
Not applicable

Re: Switch case stops working part way

Hi Michael, 

 

I stumbled on a fix for this yesterday and have managed to replicate and simplify my old state machine workflow. I used the template - "When an existing list item is modified, complete a custom action"

 

Now when a condition is based on a Yes/No column if for example "1st Approval" is equal to "No" - equates to an expression - "bool('false')"

 

The workflow triggers everytime an approver responds or rejects 

View solution in original post

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (9,588)