Add Job Title Column next to EmpName:
Use VLOOKUP to search for the EmpID in the Employee Professional Details to obtain the Job Title.
Add Department Column next to Contact Number:
Use VLOOKUP to search for the EmpID in the Employee Professional Details to obtain the Department.
Add Hire Date Column next to Email Address:
Use VLOOKUP to search for the EmpID in the Employee Professional Details to obtain the Hire Date.
Add Salary at the end:
Use VLOOKUP to search for the EmpID in the Employee Professional Details to obtain the Salary.
Add S_ID at the starting before EmpID:
S_ID is a combination of EmpID and Department (for example, 101_IT, 102_Sales, etc.).
singh_sumit
(Sumit Singh Tariyal)
2
Hey @Mandan_Purnima hope this attachment help you to get familiar with vlookup using UiPath.
Lookup Datatable.zip (138.1 KB)
CHEERS
Hi @Mandan_Purnima
According to your use case you can also use linq to solve this
Create a dt_final datatable
And use an assign statement
dt_final = (From f In dt_input.AsEnumerable()
Join e In dt_EmployeeDetails.AsEnumerable()
On f("EmpId").ToString() Equals e("EmpId").ToString()
Select dt_final.LoadDataRow( New Object() {
e("EmpId").ToString() & "_" & e("Department").ToString(),
f("EmpId"),
f("EmpName"),
e("JobTitle"),
f("Contact Number"),
e("Department"),
f("EmailAdress"),
e("HireDate"),
e("Salary")
},False)).CopyToDataTable()
Hope this helps!
Can you give me proper code for this if I want to add column dynamically like if column is not in other sheet so how to do dynamically
@Mandan_Purnima
Can you elaborate your use case based on what columns should added dynamically?