How to initialize zero for Boolean variable?

I want to initialize “0” for Boolean variable can any one please help me in this regards.
For Ex: if the variable is string then we can initialize it as “0” using assign activity.

Hi @vanithavs

Can you elaborate your task bit more?

You cant assign zero to boolean varible

What you can do is

Use if activity pass you boolean contion there and assign it to a string variable like this


Or you use directly use if in assign activity like this

expression: If(StrOut.contains(“Sample”),“0”,StrOut)
image

Regards
Sudharsan

If you need to give the condition with the datatype try like this

Condition is StrOut.GetType is GetType(System.String)

If Activity Method

if Assign method
image

Expression: if(StrOut.GetType is GetType(System.String),“0”,StrOut)

Regards
Sudharsan

A boolean has the value True or False
we can use numbers to create boolean value true or false as following:
grafik

As you see the number to boolean conversion is driven by numbers
0 = false
Any other number as 0 = true

1 Like