How to identify unique values from an excel column and write the data to a different excel in one row

Hello Everyone,

How can I achieve the below?

Conditions

  • IF Column J (Is Primary job) = “Y” Then Column P (Manager ID) = Primary Manager

  • Scenario A - IF an Employee’s Primary Manager is equal to Manager 2, 3, 4 etc. These records should not populate in the upload file

  • Secaniro B - IF an Employees record has Y in the IS primary Job Column that record should not populate in the upload file, The record should populate if the IS primary Job Is N and the ID’s are not equal to the Managers ID

  • Scenario C - Only the Unique record should populate

  • Scenario D - IF the ID’s are not equal to the manager ID, the records should populate in one row as Manager 2, Manger 3, Manager 4, etc…

Input file

Expected output

Hi @Robot2_Automation
Check this script:

Identify_Unique_Values.zip (16.8 KB)

Happy Learning.

Hi @Ali_Murtaza,

I’m seeing the below error in the workflow.
image

Hi @Ali_Murtaza - I want the output to be in the below format, but when i try to change it I’m getting multiple errors. can you please assist?

You have packages issue.
Add Package UiPath.System.Activities

Can you please share the screenshot of the error or activity you are getting the error on?
Also you might need to change the column names in all places.
For reference you can check the files I have shared with you. Cross check the column names and update them in the Automation.

For example in your case you will have to change the highlighted values to:

  1. Output_Table(Output_Table.RowCount-1)(“Employee ID”)
  2. Output_Table(Output_Table.RowCount-1)("Manager "+(Count_1+1).ToString)

Also if you want to start from Manager 2 you will have to write:
Output_Table(Output_Table.RowCount-1)("Manager "+(Count_1+2).ToString)

@Ali_Murtaza This is the error I get.

you need to add a space after Manager.

Use this:
Output_Table(Output_Table.RowCount-1)("Manager "+(Count_1+2).ToString)

@Ali_Murtaza Thank you for assistance. :+1:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.