Skip to main content
Nintex Community Menu Bar

For each loop is sending same message every time

  • March 2, 2020
  • 5 replies
  • 27 views

Forum|alt.badge.img+2

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.

 

 

5 replies

Forum|alt.badge.img+14
  • Nintex Employee
  • March 2, 2020

Hi @gita1,

 

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


Forum|alt.badge.img+2
  • Author
  • March 3, 2020

6651iE435EB0664D3A79F.png6652i0156BD112362D54A.png6653iDBE104A1E50557F6.png

 

 

6654i48F667A6642B632A.pngAbove are my screenshots from my workflow


Forum|alt.badge.img+14
  • Nintex Employee
  • March 4, 2020

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.


Forum|alt.badge.img+2
  • Author
  • March 6, 2020

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


Forum|alt.badge.img+14
  • Nintex Employee
  • March 9, 2020

@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-sharepoint).

 

6782i2B4728B3585E737D.png6783i02E62794692844F0.png