I unable to stop a loop… I have a notification that goes out if changes are needed to a form. When the person to make these changes makes the change, they have to tick a toggle (YES, like below)
this confirms they made the change but if the toggle continues to be unticked (NO, like below) the loop runs and sends out another notification until its ticked (YES).
I have it set to run every 15 mins for testing purposes. I went into the form and selected YES or ticked the toggle and the loop continues to run and send me a notification every 15 mins.
How can it check if the toggle is ticked so that it doesn’t continue to loop and send out emails? How do I get it to proceed to the next action (reset toggle/clear outcome) as shown below?
Have a look at my setup again. I believe it should work for what you are looking to do here. I updated the control and action names to make things much easier to follow.
You need a nested loop (branch by condition + start a loop) and a “dynamic” variable i.e. “var_CorrectionMadeValue”. The latter keeps track of the “Correction Made“ boolean flag value - this will allow for continuing or ending the email reminder loop sequence.
First, query the SPO list item and store the current “Correction Made” value in the WF variable - “var_CorrectionMadeValue”:
This then goes into a “Branch by Condition” logic that checks if “Correction Made” is a “Yes” or “No”.
If YES, we don't go in the email reminder loop and the workflow continues to the next logical step/end the workflow. Although not required I’m setting the value for “var_CorrectionMadeValue” variable to YES.
If NO, we go into the Email Reminder loop that will keep running until the value for “var_CorrectionMadeValue” changes to a YES. And, each time we go through the loop we also query the SPO list item to get the current value of the “Correction Made” flag and then store it value back into the “var_CorrectionMadeValue” variable that is being evaluated by the loop condition. If or when the value returns as a “YES” is when the loop is exited and the workflow continues to the next logical step/end the workflow:
Here is the updated WF key for reference: NK6X7rp3MiebXSwUS79BeDWLBa1hWTeHxHhgRt7KFbFBsBLBL
Ok, so I applied your suggestion but it seems to run to the next action immediately and sends the “assign a task” action out right after the 1st notification goes out to “make changes”. It doesn’t pause the workflow if the toggle remains unticked… am I missing something?
I need the loop to continue running and sending email reminders if the Toggle button continues to remain at NO/Unticked… but if by chance the next day the user would make the change to the form and they would tick the toggle button, then the workflow would proceed to next action to “reset toggle/clear outcome.
Here’s my setup based on your scenario, and WF export key for refence: QxA53HddQ1KC7GnYc9Swm9qFJ411vWQkh22Z55ki3oKEcftaE
Essentially, a loop inside of a loop and a set variable to keep the loop going or end it.
This would would better if you had a form(task form) inside of the secondary loop to toggle the option for correction needed or not but I think this logic should work for your scenario nonetheless. You might need to massage things a bit.
So it doesn’t seem to be working as I need. I referred to your setup but of course made changes on my end as I needed. Still no luck.
So the way I have this setup is when a form (O365 responsive forms) is submitted in SharePoint it goes to different approvers but when an approver requests a change, the user has to go back into the form and “tick a toggle” button stating they made their changes. The workflow (NAC) needs to then detect if the user has “ticked the toggle” button, but I don’t think it is… See, the toggle is set to “No” by default and currently it runs right through the actions in the WF and seems like its not pausing as I need. Below is my current setup…
In the center, I have what happens when the changes are requested. Since the email goes out once, the submitter receives it but tends to forget if not responded to immediately. I’m trying to put in a loop so an ongoing email can continue to be sent until the toggle in the form is ticked.
I don’t think the toggle is being detected as “ticked”.
Have a look at my setup again. I believe it should work for what you are looking to do here. I updated the control and action names to make things much easier to follow.
You need a nested loop (branch by condition + start a loop) and a “dynamic” variable i.e. “var_CorrectionMadeValue”. The latter keeps track of the “Correction Made“ boolean flag value - this will allow for continuing or ending the email reminder loop sequence.
First, query the SPO list item and store the current “Correction Made” value in the WF variable - “var_CorrectionMadeValue”:
This then goes into a “Branch by Condition” logic that checks if “Correction Made” is a “Yes” or “No”.
If YES, we don't go in the email reminder loop and the workflow continues to the next logical step/end the workflow. Although not required I’m setting the value for “var_CorrectionMadeValue” variable to YES.
If NO, we go into the Email Reminder loop that will keep running until the value for “var_CorrectionMadeValue” changes to a YES. And, each time we go through the loop we also query the SPO list item to get the current value of the “Correction Made” flag and then store it value back into the “var_CorrectionMadeValue” variable that is being evaluated by the loop condition. If or when the value returns as a “YES” is when the loop is exited and the workflow continues to the next logical step/end the workflow:
Here is the updated WF key for reference: NK6X7rp3MiebXSwUS79BeDWLBa1hWTeHxHhgRt7KFbFBsBLBL
You’re amazing and hanks so much for your effort in explaining this to me, I greatly appreciate your help! I’m still learning... but you’ve been amazing and keep on doing an incredible job helping others! Thanks again. 😁👍🏽
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.