Site Workflow help with Manager field


Badge +7

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.


32 replies

Userlevel 6
Badge +12

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 ([index] += 1 ) or the email notification in not inside the loop.

We are close to getting this solved happy.png!

Badge +7

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

Userlevel 6
Badge +12

‌ - 

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?

Badge +7

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?

Userlevel 6
Badge +12

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.

Badge +7

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

Userlevel 6
Badge +12

‌ - 

Glad we could help happy.png

Reply