Use operators on a Switch


I was wondering if i can you use operators on a switch activity?

For example :

Expression : code1 and code2

Case Code1 = 2 and Code2 = 4



Is it possible ?

Thank you

Not with the activity provided in Studio. However, if you want to do this it can be done with code in an Invoke Code activity.

Here’s a good example from the official Microsoft documentation:

Dim number As Integer = 8
Select Case number
    Case 1 To 5
        Debug.WriteLine("Between 1 and 5, inclusive")
        'The following is the only Case clause that evaluates to True.'
    Case 6, 7, 8
        Debug.WriteLine("Between 6 and 8, inclusive")
    Case 9 To 10
        Debug.WriteLine("Equal to 9 or 10")
    Case Else
        Debug.WriteLine("Not between 1 and 10, inclusive")
End Select
1 Like

Thank you @DanielMitchell

1 Like

Hi @mz3bel

You can use switch activity


1 Like


Ok, how ?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.