Hi Team,
(@aksh1yadav, @arivu96, @KarthikByggari, @Karthick_Settu, @ClaytonM, @pathrudu, @PrankurJoshi, @Priya_Pandey, @Divyashreem, )
Please respond as your suggestions and approaches matters alot to me.
Currently I am working on the Datatables.
I am have two datatables (lets say dtA and dtB), and I need to compare these two datatables such that particular column(lets say row(1) ) from both dtA and dtB needs to be compared and the new data column (lets say “Status” column ) needs to be created such that based on the comparative result the “Status” column will be filled with the data, if comparison is successful write cell as “repeted” and if comparison is false write cell as “new”.
Now, let me tell you my approach into this:-
A) - > for dtA manipulation
add data column (default value)= “New”
for each row in dtA
for each row in dtB
if rowDTA(1) = rowDTB(1)
write cell into DTA(column- “Status” as “Repeted”) ----------(in this case, the default value “New” will be replaced by “repeted”)
B) - > for dtB manipulation
add data column (default value)= “New”
for each row in dtA
for each row in dtB
if rowDTA(1) = rowDTB(1)
write cell into DTB(column- “Status” as “Repeted”) ----------(in this case, the default value “New” will be replaced by “repeted”)
As mentioned the new column needs to be added into both the DTs and corresponding values need to be updated.
Now, in my approach i am finding difficulty that I cannot update the value in the Status column when the if condition is true.
Here if the condition is true, I want the defult value - “New”, to be updated as “repeted”
Please let me know how can this be achieved, also you can tell me another approach which might be better and more efficient.
Please help, this is urgent.
Thanks and Regards,
@hacky