Perhaps you are incorrectly using item properties instead of Named Controls
Thanks for the response. No, I'm using Named Controls for them. When I used Item Properties, they would get returned as {ItemProperty:WorkflowState} which didn't work.
The Or Statement will continue to evaluate statements until it reaches one that is true.
Rules are "executed" when the value returned to them is true.
So what's happening?
Let's say you've set your WorkflowState to "C".
Your code is going to first evalute:
WorkflowState !== "B"
which, when translated into human speak is, "WorkflowState does NOT equal B", which is true!
Because you've reached a truthy value, the Or evaluation stops, and returns true, which triggers the rule, which hides your panel... which is not what you want.
What you actually want to happen is some sort of exclusive condition, which means that you'll need to use AND (&&) instead of OR (||).
AND, unlike OR, will ONLY return true if ALL of the statements are true. Remember, we only wanna return true when we want the panel hidden!
Consider the following:
WorkflowState !== "B" && WorkflowState !== "C" && WorkflowState !== "D"
Now, let's see what happens when you've set the WorkflowState to "C".
First the code evaluates: WorkflowState !== "B"
Well... that's true! It doesn't equal "B"! It equals "C"!
onto the next.
WorkflowState !== "C"
This is false! It *does* equal "C", and because we've now reached a false value, the rest of the AND chain no longer needs to be evaluated and this will return false. Because it's returning false, the rule will NOT hide the panel.
I hope this helps to clear things up.