Help with excel iteration / ui automation

I have a sequence that iterates through an excel file, get’s and ID from that file, goes into a proprietary windows app, enters the ID, and collects the correlated phone number.

Every now and again an ID won’t have a phone number and this breaks my sequence, causing the whole thing to stop.

What’s the best way to check for the phone #… and if its missing stop the current iteration and move on to the next?

1 Like

you were almost done
welcome to UiPath community
–hope we have a datatable named dt
–now use a for each row loop and pass the above variable as input and inside the loop use assign activity and get the value of the column ID like this row(“yourcolumnname”).ToString
–then we would be passing this to a application with TYPE INTO ACTIVITY as a input
–then we will getting the output either with a GET TEXT or SCREEN SCRAPPING method with a output variable and lets name it as str_output (a string variable)
–now while still being inside the for each row loop next to the activity that fetches us the phonenumber, use a IF condition like this
String.IsNullOrEmpty(str_output.ToString)
if true it will go to THEN part where we can leave it empty so that it will go to the next row in the datatable as it is still inside the for each row loop
or if that fails it will go to ELSE part where we can use a assign activity to assign the phonenumber value back to the datatable if we want like this
row(“yourcolumnname”) = str_output

hope this would help you
kindly try this and let know for any queries or clarification
Cheers @erikd