Hi, Can anyone please help me to solve this please!!
I have two DTs , Item1 and Item2, and i have to compare Item1 “SellCode”
by Item2 “SCode”,
If found then their price and Quantity will update by Item2 "Price"and “Quantity” values. and if no any extra value is present in Item1, then we to do nothing with that data,
Expected output:
Please Help.
Item1.xlsx (8.7 KB)
Item2.xlsx (9.7 KB)
prasath_S
(prasath S)
November 30, 2021, 6:47am
2
Hi @Anjali_Rani
Please try join datatable activity,
UiPath.Core.Activities.JoinDataTables Combines rows from two tables by using values common to each other, according to a Join rule, which is specified in the JoinType property. Properties Common DisplayName - The display name of the activity. Input...
Thanks
I don’t want common values, I have to swap the price and Quantity of Item2 in item if scode and Seller code will match.
prasath_S
(prasath S)
November 30, 2021, 7:27am
4
Hi @Anjali_Rani
Please find the below xaml,
Main.xaml (11.2 KB)
Thanks
can you send me this xaml file again, this is showing Document is Invalid
prasath_S
(prasath S)
December 1, 2021, 6:55am
6
Hi @Anjali_Rani
Please try below,
in if condition,
dt2.AsEnumerable.Any(function(d) d("SCode").ToString.Trim.Equals(CurrentRow("Sell Code").ToString))
In first assign activity,
CurrentRow("Price") = dt2.AsEnumerable.where(function(d) d("SCode").ToString.Trim.Equals(CurrentRow("Sell Code").ToString))(0)("Price").tostring
In second assign activity,
CurrentRow("Quantity") = dt2.AsEnumerable.where(function(d) d("SCode").ToString.Trim.Equals(CurrentRow("Sell Code").ToString))(0)("Quantity").tostring
Thanks
1 Like
system
(system)
Closed
December 18, 2021, 9:23pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.