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

For each loop is sending same message every time

Jump to solution

I have action items that are pending for various managers which are entered in a list. I created a nintex workflow to send mail automatically to managers where ETA is already passed and status is still open.

 

I entered calculate date(Days<-15), query list (Filter status is equal to open, sort id as mycoll, used for each loop (Target collection - mycoll and store result in myitemid) within that send notification (email address).

I am getting mails during the test run. There are three open items and it sends me same message 3 times, it is not looping to next message. What am I doing wrong.

 

 

Labels: (1)
0 Kudos
Reply
5 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: For each loop is sending same message every time

Jump to solution

Hi @gita1,

 

You could try a log to history it might help identify the issue. Do you have a screenshot of the loop? 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: For each loop is sending same message every time

Jump to solution

Full workflowFull workflowmy variablesmy variablesfor each configfor each config

 

 

QueryQueryAbove are my screenshots from my workflow

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: For each loop is sending same message every time

Jump to solution

Hi @gita1,

 

Currently your loop is just looping through the item id's. You either need to add a get item collection operation to pull the email, or change the for each loop to the nemail collection so it is looping through the collection of emails.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: For each loop is sending same message every time

Jump to solution

I am new to Nintex and have just started building nintex workflow. So could you please elaborate more on the solution

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: For each loop is sending same message every time

Jump to solution

@gita1 Based on the screenshots, the for each loop should be targeting the nemail collection as that is the collection with the emails. If you target that collection and use the stored result in a variable that will email each person in the list. If you need to have information from the other fields, then you need to set an index to identify the position in the collection and add collection operations to the loop to pull the correct value(see below).  We do have a how to video on using the collection operations(https://learn.nintex.com/series/resources/collection-operation-action-in-nintex-workflow-for-sharepo...).

 

Workflow Designer - Internet Explorer.pngWorkflow Designer - Internet Explorer.png

View solution in original post

0 Kudos
Reply