How to write If string is not empty

If myString is not “” doesn’t work, any suggestions

Hi @Aishwarya_Maggi ,

You can use String function:


this will return Boolean value.

Sasikumar K

1 Like

Use like this,
StringVariable.trim <> ""

@Aishwarya_Maggi, use this: If not String.IsNullOrEmpty(myString). It will return a boolean value


If you want to have a single line solution, then try like the following,

CStr(IIf(String.IsNullOrEmpty(“yourString”)), “Large”, “Small”))

@sarathi125, can you explain what the CStr does? Is it called within the invoke activity?


the CStr is Type conversion function available in Cstr is to convert the object to sting, here I have tried to write the result into WriteLine Activity so I have to convert it to string to write it.

for more details check here


1 Like

Thanks. Understood.

1 Like