Intellipaat 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.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...