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.
You should log the variable that you're getting before your "send notification" action and disable the email action for your testing until you are able to see what value you're getting. Can you open up your "set variable" action? I'm guessing this is where you get the employee's manager? In your "For Each" are you outputting some kind of index or ID?
Yes, using the user profile is the best way. Here are some helpful links:
So, I would do the query and retrieve the ID of all the items that match your date case. Then, for each ID, output the ID (to use to iterate through). Inside your for each, you need a query user profile. To get the email address of the user you want to run the query on, you should use the "Advanced Options" and pick
equals: workflow variable: variable you've stored the individual ID on
Your config may look slightly different as I'm in O365 but just give a holler if you can't get it sorted.
Ok, looking at the documentation here: http://help.nintex.com/en-US/nintex2013/help/#Workflow/RootCategory/Actions/Nintex.Workflow.QueryUse...
Yours looks different in On Prem. But you can do the same thing in your action now that you have the framework, I'm pretty sure .Again, let me know if this isn't clear enough.
Thank you. I've changed the query list to grab the ID and it populates in the queriedItemCollection:
. in the for each, target collection = queriedItemCollection (variable) and Store results in queriedItem (variable). I then have the query user profile:
is this correct?
Is it a possibility that the users in this list could be inactive? I don't think their manager(s) could be. Honestly, I'm not as familiar with On Prem as I'm exclusively in 365, but perhaps , , or someone else could chime in on the best way to do this with your specific action configurations. It looks like, to me at least, that you're picking from a list of attributes you can retrieve on a user. Manager was the one you originally wanted so you would know who to send the email too, so I think you would only honestly need that one (assuming all users in this list will be active). I would just use that to set your managerVar and leave everything else how you already had it configured from the start with your notification and such.