How to loop a failed RPA automation

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