Skip to main content

all,

I have a site workflow that queries a list to see if an employee has reached his or her 90 day mark and that sends an email to the applicable manager. I have a query list, then the for each loops through the employees that have reached their 90 mark today based on the hire date. The problem that I am having is, the manager (who is supposed to receive the email) only emails the first manager. so if  two employees have been hired 90 days ago today, the first manager received both emails. Any help on this would be appreciated.

Can you provide a screenshot of the entire workflow?

Is the first manager getting multiple emails or one email for everyone? 

I am trying to understand where/when it is looping/not looping. 

It sounds like you can get the manager's name, but rather than getting them one at a time, you are only getting the first one and all are executing on that single manager.  My guess is that the index is not being incremented (dindex] += 1 ) or the email notification in not inside the loop.

We are close to getting this solved happy.png!


yes, the first manager receives all the notifications (so for both employees in this case).


‌ - 

What you provided, you should be good... the email notification that is being sent, what does it contain?

Also, how/what are you setting in the "Set Employee Name" step?


the set employee name variable is the varEmployeeName to workflow data - queriedItems (Display Name). The email goes to the managers but I have it disabled for testing purposes. The email when testing only go to the first manager (for both employees). Am I missing a loop or something?


are you increment your index value? I am wondering if it is pulling the same manager for both because you are tellingit the same index.


I removed the index from the loop and re-added it. it is working now! Thank you ‌ for all your help!!!!


‌ - 

Glad we could help happy.png


Reply