Pipeline switch block not able to output second value

According to the manual, the syntax of switch block is

//The following would return "Running".
switch(
1, // value
0, 1, 2, // cases 1-3
"Off", // return 1
"Running", // return 2
"Fault", // return 3
"BAD STATE!") // default

My logic is

switch(
    "Commercial",
    "Battery", 
    "Commercial",
    "BatteryLow",
    "CommercialPowerLost",
    "Others"
)

However, "CommercialPowerLost" never got to output. If I change the compare value to "Battery", "BatteryLow" will output. Please advise.

Are you creating a Switch Block, or an expression block that contains a switch expression?

Hi PGriffith,

I am creating a Switch Block within Alarm Pipeline.

In a switch block, you don't actually write out a switch expression. You write an expression that returns a single value (such as a tag reference {path/to/tag} or other logic), and then add 'cases' to the switch block via the GUI. The switch block will run your expression once and then look up which case to enter based on the provided inputs.

I c. Thank you