Hi

My Condition is a Integer.

One of my case is for the integer > 5. But when I enter >5, I get error that is not valid for int32.

Thank you

Hi

My Condition is a Integer.

One of my case is for the integer > 5. But when I enter >5, I get error that is not valid for int32.

Thank you

Hi ksrinu070184,

Thanks for the reply. To clarify, I am using a flow switch, not switch statement.

2ndly, I have many cases.

integer=1

integer=2

integer > 5

So I canâ€™t use boolean for argument.

Thank you

In this case You can use a IF condition like

Assign a variable as Status

If Integer = 1 then assign Status = 1 else If Integer = 2 then assign Status = 2

In this way you can try

Mark as solution if this helps

Thanks

Hi

Sorry, I donâ€™t understand. I just want to know how to have a case with integer >5 in Flow Switch.

Thank you

Hi

Thank for the image.

But the Flow Decision only decide if int222 is > 5 or not. But what about when â€śint222â€ť=0

int222=1

int222=2

I want cases for these too.

Thank you

Hi

Beside flow switch, are thee other activity I can use for

Case =0

Case =1

Case =2

Case >5

Thank you

You have add another condition and make status to 3,4 and so on

According that you can configure your flow switch

Thanks

Hi,

Can you try the following?

First, set the following expression to Condition property of FlowSwitch activity.

```
Convert.ToInt32(intVar=0)+(Convert.ToInt32(intVar=1)<<1)+(Convert.ToInt32(intVar=2)<<2)+(Convert.ToInt32(intVar>5)<<3)
```

This meansâ€¦

If intVar=0, it returns 1,

If intVar=1, it returns 2,

if IntVar=2, it returns 4,

if intVar>5, it returns 8,

if others, it returns 0,

So, you can achieve it, if set activities as the following image.

Regards,

1 Like