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 :-
Hi @ranaprathap928
As within If Condition as @ImPratham45 said
If that wont work then also try for below things :-
String Variable = “”
String Variable = String.Empty
String Variable = " "
String Variable = Nothing
OR
String Variable.ToString.Equals(“”)
String Variable.ToString.Equals(String.Empty)
String Variable.ToString.Equals(" ")
String Variable.ToString.Equals(Nothing)
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er …
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
2 Likes
RajeshT
(Rajesh)
August 3, 2020, 9:13am
3
Hi @mannu.1996.08 ,
You can try below conditions:
Var.equals(“null”)
Var.equals(“”)
also check if there is space Var.equals(" ")
1996
(Neelima G)
August 3, 2020, 9:21am
4
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
Happy Automation
Best Regards
Er Pratik Wavhal
system
(system)
Closed
August 9, 2020, 5:05am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.