Hi, I am trying to check if the cell in the column is empty. I created a variable for the column named ‘in_St’ with get row item.
in ‘if’ I wrote the condition like this: Status=“”
Every cell in the column is empty but the answer is showing that not empty. Can anyone help me?
check like this:
String.IsNullOrEmpty(Convert.ToString(row("column name")))
Print in_St to your output. My guess is that there is whitespace in the cell.
If you want to skip cells with whitespace, change your condition to say in_St.Trim = ""
.
@Nabila_Sabreen, this is because in_st is null. Please change if condition like this: “in_St is Nothing” and it should work
Heyy, it worked. Thank you Bhavik!
One more question, when I put the same condition in flow decision again it’s showing not empty. Any idea?
@Nabila_Sabreen, ideally behaviour should be same. If not you can try the condition as suggested by @bcorrea.
E.g. String.IsNullOrEmpty(in_St)
Not working
what is the type for variable in`_st? you should check the actual value of it to see why it is not working… it could be DBNull.Value maybe…
@Nabila_Sabreen There might be White spaces as well, Try using two conditions in this way :
String.IsNullOrEmpty(in_St) or String.IsNullOrWhitespace(in_St)
Considering in_St as a String Variable
Hey guys, all the ideas you gave were correct. Thanks a lot for the help. I am working with google sheet in uipath Gsuite option and for some reason the worksheet was giving wrong data. But I fixed the worksheet and now it’s working fine
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.