Filter HR automation with different cost centers and different managers and send email

Hi Team,

Please help me with this scenario .I have a sample HR excel sheet in which we have to do following things:

  1. Filter with cost center skill of the employees
  2. if there are multiple reporting managers for that cost center.
    For example: Tableau have John( for employee 1243) and Mounika(for employees 1235, 1254, 1259) as managers.

Then, rows belonging to 1243 should be sent to John and the Tableau cost center owner and rows belonging to 1235, 1254 and 1259 should be sent to Mounika and the Tableau cost center owner.

sample data below and mentioning sample mail ids in sheet 2 with cost center owner. Please help!!!

Sheet 1

Location EMP ID Name of the Employee DOJ Designation Level(L1,L2,L3,PM, SME) Reporting Manager Cost Center
B 1243 30-Jun-12 Senior Executive L3 John Tableau
H 1235 12-Jan-09 Architect L3 Mounika Tableau
H 1235 12-Jan-09 Architect L3 Mounika Tableau
H 1254 06-Mar-18 Assitant Manager L3 Mounika Tableau
H 1259 22-Apr-19 Associate Engineer L2 Mounika Tableau
![image 518x121](upload://1wHvpGgJT2OwCJNFN8HDeZVXJxF.png)

Sheet2

Owner Costcenter Email
John SQL jo@abc.com
Mounika Tableau mou@abc.com

Hi Muralikrishna,

What I would do is create a new data table that contains only the columns Reporting Manager and Cost Center. Than you will group the data from your table by those two columns.
The final result in this case will be:

Reporting Manager / Cost Center
John / Tableau
Mounika / Tableau

Then you loop through this second data table, and for each row you filter the main table by reporting Manager and Cost Center.
In this way your will have only the data regarding that combination filtered and ready to use (write on a spreasheet and attach to an email, for instance).

To group by the datatable you can use some activity (there are third party acitivities that do this) or explore with Linq.

Of course you could also build this is a more flexible and reliable way using REFramework. In this scenario you would group by manager and cost center in a dispatcher robot and feed a queue with each combination.
In the performer you would get each queue item and filter the main data as I described previuosly and them to what you need to do with it.

Hope this helps, happy automation!

1 Like

Could you please help me with sample workflow xaml file