Please check the screenshot
Check Id value and put in Name column
Ex.
ID(123)=Name(Jeff)
ID(444)=Name(John)
Try this in invoke method…send dt as in/out argument and dt1 as in argument and both needs to be assigned with same datatable variable in arguments
Dt.AsEnumerable.ToList.ForEach(sub(r) r("Name") = dt1.AsEnumerable.Where(function(x) r("ID").ToString.Equals(x("ID").ToString) and Not String.IsNullOrEmpty(x("Name").ToString)(0)("Name"))
Cheers
Hi @rlgandu Solution is right but if ID row is blank then other column get above row value, i want only value which has ID
Thanks @Anil_G but i don’t want to use invoke method activity, you have any other solution
in for each loop take if conditin
Not String.isNullOrEmpty(CurrentRow(“ID”).ToString)
Perfrom the actions in true block
in else
Use break
Try the steps
- For each row in datatable dt
- Inside loop use if condition with
String.IsNullOrEmpty(currentRow("Name").ToString)
- on then side use
currentRow("Name") = dt.AsEnumerable.Where(function(x) currentRow("ID").ToString.Equals(x("ID").ToString) and Not String.IsNullOrEmpty(x("Name").ToString)(0)("Name")
cheers
Try this below code . Hope it will be helpful.
Main.xaml (18.3 KB)
Looks like I missed a bracket please check this
dt.AsEnumerable.Where(function(x) currentRow("ID").ToString.Equals(x("ID").ToString) and Not String.IsNullOrEmpty(x("Name").ToString))(0)("Name")
cheers
Getting this error
yes it has data
I shared the screenshot above
Looks like there are few empty rows…before running this can you filter on the empty rows please
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.