Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k points)

Does anyone know how to check for an unassigned string in uipath? Uipath seems to crash when an if statement looks for a null string. Not sure how to handle that. String.empty doesn't seem to work, and if the string is unassigned uipath stops logging and nothing happens.

1 Answer

0 votes
by (29.5k points)

There can be various ways of handling this, what comes to my mind is:

  • If you are creating a variable by default always define it, initialize it with empty strings (" "). this makes it easier to check also with 'equal to' operator.
  • You can use .Net String.IsNullOrEmpty Method (String) Method.

Related questions

0 votes
1 answer
asked Feb 3, 2020 in RPA by Abhishek_31 (12.7k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...