My requirement is like from excel I need to add entries to a web application and update the status like “PASS” or “FAIL” in status column of excel.
I have achieved this part. The problem comes when I again process the sheet I only want to pick the row which have status as “FAIL” and then add entries to the web application update the status from FAIL to PASS and the same status needs to be updated for that particular row in the Original Excel. Please help me with the last piece like: As I have filtered the datatable and performing the action and updating the status but how to update the status for that row in Original Excel sheet.
Hi
Welcome back to uipath community
I hope you would have obtained a Datatable and then iterated through each row one by one with a for each row loop and then entered to a web application
—so inside the for each row loop use IF as first activity and mention like this row(“yourcolumnname”).ToString.ToUpper.Equals(“FAIL”)
If the above condition passes it will go to THEN part where we can keep all the activities so that it will update only the rows with Fail as value in status
I assume you are working with REFramework, inside the Process state, you can check the transactionitem(“yourStatusColumn”).Tostring.Trim.ToLower = “fail” or transactionitem(“yourStatusColumn”).Tostring.Trim = string.Empty then you can proceed with your process for that row.
If you have not completed the development fully, then I recommend you to migrate this process to ReFramework with Tabular data for more stability during production time.
If you want to continue withour REFramework then you have to follow the steps mentioned by @Palaniyappan in this thread
Expecting you to be the first to reply on my topic! You are doing an amazing job!!!
Now coming to the point:
I am using Read CSV activity reads the excel into a Datatable A and then filtering it on the basis of status “FAIL” and storing it into Datatable B, performing the operation into web application and updating the status in Datatable B.
Now what I want is as the Datatable B rows are updated from Fail to Pass the same should br updated to Datatable A for corresponding rows so that I can write it into CSV file usinf write CSV activity.
@sarathi125 I have just replied to @Palaniyappan what I am doing actually. Can you please go through it and help me out.
Sorry as of now we can’t migrate to ReFramework but in later phase will do that for sure. @sarathi125@Palaniyappan you guys are doing a wonderful job in community as in most of the post I see your comments and solutions.
Yah this can be done with lookup datatable activity
So now we have datatable A with old values and datatable B with updated values
—use a for each row loop and mention the datatable A as input
—then inside the loop use a LOOKUP DATATABLE ACTIVITY where in the property panel mention
Input - row(“Status”).ToString
Datatable - datatable B
Column name - “column name common in both datatable”
Target Name - “Status”
Output result - str_output
—now followed by this in a assign activity row(“Status”) = str_output.ToString
@PalaniyappanThe execution is failing at Assign activity. So I tried removing To String function. The execution was completed but the status column was completely blank.