How to loop a failed RPA automation


I have an automation to input a data from excel to website. Is there anyway for the robot to input the data and delete the inputted data until it’s done?

For example, 20 data need to be inputted into a website

first 7 data inputted and then an error happens. So there is 13 data remaining to be inputted, the robot will start entering the rest 13 data.

if there’s an error, the step will be repeated until all data inputted. Is it possible?

Hello @Rhys18 ,

Perhaps the Insert/Delete Rows activity might help you.

Best regards,

I was thinking of this one before. So after 1 data inputted, it will delete the inputted data 1 by 1?

Hi @Rhys18,

If the application has a reset feature, you could refresh/reset the form once the bot finds an error.

Ok, this is do able by refreshing the site, but how did the robot read the data that are done inputted and not yet inputted to the website? The data is from excel file

Hello @Rhys18

Does that mean you need to add data from excel to same field in the website or to different fields in the website?

If you need to pass it to one field, then you can join with comma and then use TypeInto.
Else if you need to Type Into multiple fields and an error is happening between entering, then I hope you need to refresh the application and perform the same task again. This can be done with a Flag value and a Try catch.

Flag value to check whether the data inserting was successful for all fields.


Yes. Or you could keep data for traceability and amend your workflow by adding an additional column to your excel. Let’s say a new ‘Status’ column.

Finally the logic should look like this:

Hope it helps!
Best regards,

Okay. This can be solved using the below steps

  1. Create 20 stages in your RPA solution. One for each data entry
  2. Create 20 boolean flags in an excel file. It can be either true/false. By default false will be the value
  3. While filling the form for a particular application, check if the stage is already processed by using the flag in the excel file
  4. If the value is false, Fill that data in the website and set the flag to true

Thanks for the help! Got the logic now

So after 1 data inputted, the robot open the excel then use delete first row, and so afterwards.

This can’t be done because the number of data that are needed to be inputted to the website can be 5,10, 30, 45, 60… So I guess I will just use delete rows 1 by 1.

Yes. this is not the best solution if you are dealing with a dynamic number of data points

Yes but thanks for replying :slight_smile: I will stick to the delete rows activity and add condition in the early.

if(dt.rows.count > 0 )
input all data

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.