If condition check error

Hello,

I have three arguments which i am trying to check in if condition whether id blank or not. i have used several syntax like varIsNullOrEmpty, var = null or var = " " etc but the bot is not entering that if block. What could be the issue? these arguments are of type string… Please suggest what could be the issue.

Thanks.

Hi @mannu.1996.08

Below is the thread you should try doing it :-

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

2 Likes

Hi @mannu.1996.08 ,

You can try below conditions:
Var.equals(“null”)
Var.equals(“”)
also check if there is space Var.equals(" ")

Hi @mannu.1996.08,

Try this methods:
Method 1:
String.IsNullOrWhiteSpace(stringVariableName)

Method 2: (if you are expecting null)
stringVariableName Is Nothing

Method 3: String.IsNullOrEmpty()

Method 4: String<>Nothing

Method 5 :String<>“”

Hope this helps.

Regards,
Neelima.

Trying this (in visual basic)
string.isnullorempty(yourVar)

or this (in c# )
String.IsNullOrEmpty(yourVar)

In my case var = Nothing is working. Thanks @Pratik_Wavhal

Hi @mannu.1996.08

You are welcome :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.