I have a Loop with Conditions that I can't seem to get to wait until each condition is true. Is my nexting of actions wrong? Each condition should wait until 3 SharePoint fields are not empty, but it just continues with the action and completes the whole workflow each time. Any ideas why it's not waiting for each condition to become True before continuing?
Solved! Go to Solution.
Hello again Marian- thank you! See attached. I assumed the loop would keep going around until each condition = True. But without ever putting anything into one of those 3 fields, the workflow just passes the loop and continues until the end.
It should keep looping until each of the 3 conditions=True THEN move on to send the next email.
I assumed the loop would keep going around until each condition = True.
while overall condition evaluates to true, loop is iterating over and over
the workflow just passes the loop and continues until the end...
what does this exactly mean?
does it goes over the loop body once, executes actions (sends notification) and then jumps out of loop?
or does it just reach loop action and then continue past the action (so skips loop body)?
But without ever putting anything into one of those 3 fields
you based your loop conditions on a set of list fields. note users (usually) do not know something is running and looping in the background and so that they should change something asap.
this may cause long running or even infinite loops (and so wasting your farm resources). that's not proper design.
loop action is usually conditioned by a workflow variable which is changed appropriately within the loop to cause the loop to finish in a reasonable time or after reasonable amount of iterations.
OK I guess I was thinking of the Loop BACKWARDS. Each condition should read IS EMPTY so the Loop starts, does that sound right to you? Then use another action to check that each field is NOT empty?
Not sure if it goes around the loop
check the "View workflow history" (graphical overview). there you should see which actions were executed (green actions) and which not (grey actions)
the workflow does Pause for Duration (I set it at a minute just for testing) but then after the minute it continues until the end.
is the pause within the loop or out of the loop?
it's not present on your screenshot.
I wanted the Loop to run once a day (Pause for 1 day) until each condition = true, THEN continue on to the next item (2nd email sent).
I think these are the main misunderstandings...
loop runs while overall condition is true, not until it is true.
as well it evaluates the whole condition whether to proceed or not single expressions within the condition.
I wanted the Loop to run once a day
for this purpose it's better to design a site workflow, and schedule it to run daily.
THEN continue on to the next item (2nd email sent).
I somehow miss the point of this design.
when workflow starts, it reads in bunch of items. then you want to send notifications one at a day.
so if you read in 100 items at the beginning you'll be ending them for 100 days....
if anything changes with those items in the meantime (eg, they may be deleted), your workflow will not reflect that.
OK I guess I was thinking of the Loop BACKWARDS.
hard to say for me what you were thinking of
Each condition should read IS EMPTY so the Loop starts, does that sound right to you? Then use another action to check that each field is NOT empty?
I do not know. I do know what you want to achieve - in what circumstance loop should run and in which not.
but as I mentioned above, to condition looping on list field value is not wise design.
Indeed, the loop condition keeps looping while outcome is TRUE. Apart from changing the condition to Is Empty, you also should replace AND with OR, otherwise the condition stops as soon as 1 is no longer empty. Assuming that the loop should stop as soon as all 3 are no longer empty.
I understand now the loop condition keeps looping while the outcome is TRUE. I thought the complete opposite before.
I want the workflow to send an email to a team and pause until that team fills in 3 fields that are required. I thought a Loop with Conditions was the action to do that. It would keep looping until each item was "not empty then move on to the next item in the workflow. I guess now I don't really understand the point of the Loop if it runs while true.
I guess I need another action entirely. Workflow pauses until fields1, 2, and 3 are not empty. Once those are not empty, the next email is sent to the next team for the information they will supply. Workflow is paused until they fill in their fields, then it moves to the final step.
Hello Jean-Pierre-- thanks for the information. Can you tell me if I use "or" for the 3 items, the loop will keep running until each of the fields has data in them, right? Once all 3 have data in them, the Loop condition is no longer true and it will move to the next step?