I have two datatables one which is the original and I take a few rows from there and work on it (by creating an auxiliary datatable), I update the status on the dt_aux and would like to update those statuses on the specific rows I worked on in the original datatable.
To help understand, I have table 1 Original
Then I filter the NULL rows to table 2
Work on them and update status to OK
Then I want to update those statuses on the Original Datatable
Is there a way that I am not seeing?
I thought of taking out the NOKS from original and then adding them back in but if I have no NOK an error might occur cause I cant write an empty dt.
My issue is to find a way to cross reference the work that I will do in my dt_aux, your answer would work if every status is “ok” and unnaffected by what happens in datatable_aux. I wanted to find a way to write on status original whatever the status in dt_aux would result in as “ok” is not always the answer.
Let me know if you have any questions. Thank you again for your time!
I believe this could be done by @Yoichi 's Implementation provided above, You would just require to perform the Operation of Deciding if it is OK or not OK inside the For Each Loop and then maybe use an If Condition and decide if it is OK or NOK using an Assign Activity.
As the logic of Deciding OK or NOK is still not exposed to us, we could only maybe suggest you the approach.
Let us know if you were not able to understand the above approach suggested.
From looking through the code sent by @Yoichi I was under the impression that there is only one datatable, my issue is with synchronizing (updating) the status from one datatable (dt_aux) with another (dt_original). I would be able to do this if the dt had the same number of rows, however, due to some rows not beeing transferred to dt_aux I dont know how to change the status according to their names.
As a demonstration, after working on dt_aux, how would I update the original dt with the values coming from dt_aux I would need a way to link the names as in change the status in row with name A (original dt) with the status in dt_aux with also the name A, and from what @Yoichi sent me I dont see it, or am I missing something?
Hi, after some thought I understand the process that @Yoichi is trying to make,
However, I am still missing the assign which connects dt with the corresponding dt_aux. Which in the case of @Yoichi he just assigned to ok, is there a way to assign the value of a row in dt_aux to the dt original?
I would need a counter to match both rows, and the if loop will take out all the non NULL status values on the original.
I would like to apoligize, I shouldve understood your reply and think about it further rather than respond immediately (I am a beginner in UiPath), yes you are absolutely right, I dont need to create an dt_aux since I can just put an if in the for each to run only on NULL rows. I am sorry for wasting your time, I should read and understood your reply more carefully.