Rakesh_N1
(Rakesh N)
January 18, 2024, 6:52am
1
Hello. I have a switch statement where i want to perform some task if a certaint variable has something.
My question its, What shall i insert in the expression field ? My variable its of type string and only want the cases to be executed if the variables has something in it.
Try using
String.IsNullOrEmpty(strText) where strText is your string variable. in expression field and change type argument to boolean.
lrtetala
(Lakshman Reddy)
January 18, 2024, 6:54am
3
Rakesh_N1:
Hello. I have a switch statement where i want to perform some task if a certaint variable has something.
My question its, What shall i insert in the expression field ? My variable its of type string and only want the cases to be executed if the variables has something in it.
Hi @Rakesh_N1
Can you try below
Not String.IsNullOrEmpty(YourStringVariable)
rlgandu
(Rajyalakshmi Gandu)
January 18, 2024, 6:54am
4
Rakesh_N1:
Hello. I have a switch statement where i want to perform some task if a certaint variable has something.
My question its, What shall i insert in the expression field ? My variable its of type string and only want the cases to be executed if the variables has something in it.
@Rakesh_N1
Not String.IsNullOrEmpty(yourStringVariable)
use not String.IsNullOrEmpty(yourVariable)
in expression field
AMAN_GUPTA
(Aman Gupta)
January 18, 2024, 7:05am
6
Hi Rakesh,
You can use Not String.IsNullOrEmpty(StringVariable) or also (stringvariable.trim.length>0)
Regards,
Aman