i am trying to split names in a excel sheet. so I can have a message box display only the first name or last name. i am able to do that but then i get a error saying the parameter s cannot be zero when there is a empty cell. What I’m trying to accomplish is to input something into a message box and have the activity stop once there’s an empty cell. after that it will go into a website and perform other activities. so how can i stop this error from happening so the rest of my workflow can work.
Hey @Shazid_Rahman
I hope you are trying to loop the excel data table as rows.
So you need to have a check here with an IF
statement to break the loop whenever the value is empty.
Condition will be something like below,
String.IsNullOrEmpty(Convert.ToString(your_var))
Else sequence → Just do the split logic
Then sequence → Just break the loop using Break
activity
There are many other ways to do this, but the above is a pretty straight forward way. If any of my understanding is wrong from the above please excuse and let me know
Hope this helps
Thanks
#nK
i tried that but the if statement is not working.
can you show me a workflow or anything
everytime i run the if activity with the break. it just breaks, and anything else. but it suppose to go through the names and then break when there is empty cell
.
this is what im doing and its not working it just breaks right away