Attached is a quick example. Place this in C:\Temp and then make an excel connection to the backlog.xls file.
This is the sample file you sent earlier. I added a worksheet that had the same job managers in the first sheet and made up some email addresses. The example is going to select from your original file and only send the rows applicable to that job managers email address. P.S. You need to use this example using TDA 2.6. The BETA that is currently posted is very close to the GA version about to be released.
I follow these steps in the Automation script:
- Add a variable JMGR to hold the mgr id.
- Add a variable EMAIL to hold email address.
- Using the Execut Script activity I query the Job_Manager worksheet. This will put all of the rows into one variable called MGRS.
- Add a Loop DataSet variable and point it to the MGRS table variable.
- For each row in that data set
a) Set the Job_MANGER column value to the JMGR variable.
b) Set the email column to the EMAIL variable.
c) Add a Select to Excel. Query the JOBS worksheet using a a bind var. This has to be the same name as JMGR as this is the value we want to filter on. Export the data to an excel file that has the manager id as part of the file name. You don’t have to do this but it is a nice touch.
d) Now add an email that uses the email address and attaches the excel file that has the data in it just for that manager.
Run the script and it should help out. I noticed that if you click on the variable acitvities they might jump around so make sure the sequence looks like what is in the screenshot attached.
Let me know what questions you have or if this is what you had in mind.
BackLog.zip (8.05 KB)