How can i write condition for Switch Activity

Currently i’m using this syntax in IF activity
Cint(DT_InvoiceData.Rows(0)(“Quantity”).ToString) < Cint(dt_PO.Rows(0)(“Quantity”).ToString) OR Cint(DT_InvoiceData.Rows(0)(“Unit Price”).ToString.Replace(“$”,“”)) < Cint(dt_PO.Rows(0)(“Unit Price”).ToString.Replace(“$”,“”)) OR Cint(DT_InvoiceData.Rows(0)(“Subtotal”).ToString.Replace(“$”,“”)) < Cint(dt_PO.Rows(0)(“Subtotal”).ToString.Replace(“$”,“”))
, I want to use this in switch activity. What changes should i do?
There are three cases

  1. Less than 0
  2. Equal to 0
  3. Greater than 0

@Anil_G @Sudharsan_Ka @supermanPunch


Basically switch needs a specific output like 0 -1 and 1

So whatever youa re checking for zero eg…varaible be x

Then you condition would be If(x=0,0,If(x<0,-1,1))

Please replace x with any condition you need


1 Like

@pravin_bindage : Please refer to screenshot.

I just have implemented what @Anil_G : Mentioned & Its working.

1 Like

You can do it in a Switch, after all that’s what you asked for, but in my opinion it would be more natural to use the “Else If” activity.