I have to do data entry into a website and I am using ‘For Each Row in DataTable’ to do it. After entering details of an individual, I have to click ‘Add Individual’, and proceed to another tab after I’m done. However, I cannot proceed as there will be a blank individual details. I cannot move the activity to click ‘Add Individual’ to the front of the loop either as there will be a blank at the front instead. How can I make the robot click the ‘Add Individual’ only if there are more rows in the table?
hey
you can validate if there are your using YourDT.RowCount > 0 then loop through the dt and first click the add person, fill the data, and it will do the same until reach the end of your dt
regards
Thanks for your reply. Unfortunately that will not work as the click ‘Add Individual’ is done at the end of the loop. If say, I was on the last row, it will end the loop by clicking ‘Add Individual’ and there will be that blank individual details leftover.
not really, after you validate that you have data in your DT, the first activity to execute will be the add individual, then fill the data
Hi, sorry I misread what you said. I cannot put the add individuals at the start as the blank section will appear at the front instead of at the back.
Hi @Ivan17
You can use an IF condition to Click on the 'Add Individual’ by checking if there is some values in the row.
Example : row(“Name”).tostring.length=0 use in IF Condition
You can check any one of the Parameters of the row if its empty you need not Click on the 'Add Individual’ or else you can Click on the 'Add Individual’
Hope this helps.
Thanks.