Hi guys I am currently doing expanding my workflow. It sends reminders if a due date is approaching, stating how many days are left. Depending on 3 conditions,
Send emails when the column daysleft is 7,
daysleft is 3 to 0
daysleft is 0 or less.
This is my workflow. How it works is it query the list column and then, stores the results in a collection variable, then I use the for each loop to store the results in the collection into a variable. The set condition is to check whether the variable is = 7 days. If yes send the 7 days email. If no, send if variable is 3 to 0, the other is to send if >0 days.
It works perfectly, however now I want the email notifications to not be sent if the column, Issue Status is changed to Closed or Open. It will send if its in Progress. I think that I have to use Query List to obtain the text and store it in a collection variable, then use each loop, but I don't know how to do it.
Solved! Go to Solution.
Hi John Lim,
You're indeed on the right track. Indeed you need to include the Status field in your query and assign it to a 2nd collection variable. In the loop you can specify a number wf variable to hold the index, which you can use to get the Status for the current due date. In the Foreach loop put your emailing logic into a Run-if Status != Closed (or whatever criteria you require).
Thanks, for your observations, oh sorry I put the title of the Run if wrongly, but the function is correct. The configuration for that is Run If Variable< 0
These are my variables, I want to know if I can store my 2nd collec variable into a single line text variable, will it be ok?
This is my updated workflow, is this correct?
Sorry for the messy crop, my screen has a really small resolution.
extend filter conditions in your initial query list action so that it returns only match items where Status == 'In progress'
you need not then change rest of the logic anyhow (no special checks for item status)
This is not what I had in mind. The Foreach allows you to store the Index of the current item in DaysLeftCollec and store it in a workflow variable, for example varIndex. Which you can use in a "Collection operation" action to Get the status at varIndex in the IssueStatusCollec and store its result in a single line of text variable.IssueStatusItem.
See below example (actions are not configured, hence the warning sign in them):
Actually Marian's makes indeed more sense and would be the most simple one to implement; mine would be a decent alternative . The Query list has a Filter section, so you don't need a separate Filter action.....
no, I don't mean 'Filter' action, I mean filter conditions within Query list action.
add one another condition to the existing ones, like 'AND Status equals InProgress'