cancel
Showing results for 
Search instead for 
Did you mean: 
ieatorange98
Nintex Newbie

How to stop an action in the workflow under certain conditions

Jump to solution

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.

Labels: (1)
0 Kudos
Reply
13 Replies
jpmhuls
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump 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).

2 observations:

  1. At the start you mention "....daysleft is 0 or less....", however then you change to "...the other is to send if >0 days...' (also reflected in the run-if in the right parallel branch).
  2. If my 1st observation is correct and the 3rd email is indeed to be sent when daysleft is 0 or less days then using a parallel action for determining the 2 last emailing moments does not make sence. Just put both Run-if behind each other, as I don't think they will ever be executed together.

Best regards,

Jean-Pierre

0 Kudos
Reply
ieatorange98
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump to solution

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.

0 Kudos
Reply
Automation Master
Automation Master

Re: How to stop an action in the workflow under certain conditions

Jump to solution

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)

Reply
jpmhuls
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump to solution

Hi John,

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):

0 Kudos
Reply
ieatorange98
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump to solution

Hi under the filter what option should I change to? Thanks!

0 Kudos
Reply
jpmhuls
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump to solution

Hi John,

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.....

Reply
ieatorange98
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump to solution

Hi I don’t mind that photo, I realised its in the query list. But how do I filter it from there, I can’t seem to find any options. 

0 Kudos
Reply
Automation Master
Automation Master

Re: How to stop an action in the workflow under certain conditions

Jump to solution

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'

Reply
ieatorange98
Nintex Newbie

Re: How to stop an action in the workflow under certain conditions

Jump to solution

Ahh I see, thank you so much.  I will get back to u tmr, I’m away from my computer right now . 

0 Kudos
Reply