I want to extract only recently updated records from excel while bot triggers. I am trying with filter data table activity. Any one can help me on this.
Welcome to our UiPath community.
Add one more new column at the end called Status. Update the status as successful or failed post processing the record. So that you can easily identify the newly added records(whose status will be empty).
Hi @Hareesh_Kumar ,
It depends on how you detect these recently updated records.
If there are column(s) which are initially empty, then later on get filled with data, we can filter on the basis of those columns like so:
Kind Regards,
Ashwin A.K
Hi
Welcome to uipath forum
There are two possible ways to do this but it requires some tweaks with the code
- First approach is to have a separate folder apart from the main folder
Where main folder actually has the file with data before it is updated
And separate folder named as temp folder will have the updated file
— then read both the files and have it as dt1 and dt2
Use the below expression to get the unmatched records which are the newly updated records
dt = dt1.AsEnumerable().Except(dt2.AsEnumerable(),System.Data.DataRowComparer.Default).CopyToDataTable
Or
- Second approach is to use a column atlast in that same excel file named as Status
And leave the status column as empty for the newly updated records
Now use a Assign activity like this and get the new updated records
dt = dt.AsEnumerable().Where(Function(a) String.IsNullOrEmpty(a.Field(of String)(“Status”).ToString.Trim) ).CopyToDatatable()
Cheers @Hareesh_Kumar
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.