I want to input values of an entire column with the column values of a different table. I dont want to merge the two tables. because the first table has columns which are calculated fields based on this column. I have attached a sample file for clarity.
input values into column.xlsx (9.9 KB)
P.S. I dont want to calculate the “Annual Salary” column using Uipath. I just want to input the column values from input table 2 to final table. In a way vlookup those values
@jamnanin,Use foreach row of datatables,Then getrowitem And then assign row"headername=“your variable”
you mean nested for each row?
yes if you wanna compare two datatables
Read the Second DataTable and store it in dta
Create a Dictionary of type (Of string,Of string)-Dictionary
Dictionarty=( From p in dta.Select
Select p).ToDictionary(Function(x) x("Name").ToString,Function(x) x("Monthly Salary").ToString)
Read the Final DataTable and store it in dt2
Run For each row for DataTAble 2
And check in if condition Dictionary.Keys.ToList.Contains(row(“Name”).ToString)
If true use Assign activity
If you want to update other rows also u can add a condition according to your requirement and update.
Thanks @MAHESH1 the pasting of values worked. but the formula in the “Annual Salary” column doesnt stay and therefore I dont get the calculated "annual " column
You only told right, you don’t want to copy the annual salary
You can enter the last column also by doing this in if condition
I meant i dont want to calculate that field using Uipath’s assign activity but i want the formula to stay so that when i input the monthly salary column the “annual salary” is calculated automatically. Because I also have other sheets which has columns which are calculated using this “monthly salary” column