[Feature Request]Help prevent crossing wires from Switch node

What is with the potentially second or third otherwise?

  1. I will have water
  2. Unless there is no beer
  3. Unless there is no wine
  4. otherwise
  5. Unless there is no fridge :frowning:
  6. Unless there is no soft drink
  7. otherwise
5 Likes

I feel some people are not taking this conversation seriously enough :smile:

2 Likes

@cymplecy: I have no strong feelings against your FR. :smile:

What really surprised me was the fact, that the switch node has an option for multiple otherwise outputs. I have a hard time to wrap my head around this feature and have no clue what I would expect from this node to output.

1 Like

Try it, it will save me doing it :slight_smile:

My head hurts from reading all these variants.
Having more than one 'otherwise' option is nonsensical.

Simon, when you worded it as "If no rule matches", you triggered another thought...

Remove the "otherwise" option from the list completely, which simplifies the ladder-type logic and keeps people from "assuming" things -- or trying to use more than 1 otherwise with that ambiguity!

Then, add an select box at the bottom to allow for "If no rule matches, send output to [First | Last] port" -- with the First or Last choice as a pulldown selection?

1 Like

If there is no "otherwise" shown in the ladder then 1st or last port would actually refer to a completely different rule ?

How would you then know if the output was from the rule in 1st or last slot or an "otherwise" match ?

I was picturing that the selected first or last port would be "reserved" - so if "First" was selected then the rules would be numbered 2-n and all non-matches would go to port 1.

But that brings up another interesting point... In the past I've needed multiple rules to go to the same port, but since the numbers are auto assigned by position that is not possible.

So I would support a new UI selector that defaults to assigning the next available port number, and allows me to select any existing number.

That would be the ultimate solution but would require the most re-coding of the switch node

Yes and a whole bunch of UI complexity, vs say... drawing a line between one point and another.... :slight_smile:

4 Likes

So, I think we are at the stage of we can't alter the current behaviour of "otherwise" in case someone (however unlikely - I'll put a fiver on the table that it's no-one :slight_smile: ) has it in another slot and if its behaviour was changed - it would cause them issues

I also think, that some people wouldn't like it in the top spot with its present name but if it was named "default" (like JavaScript) or something like "if no other rule matches" then they could sleep at night :slight_smile:

Keeping "otherwise" and adding "if no other rule matches" works at a technical level but some people don't want to see two similar options in the menu

Request to alter output port numbers seems a non-starter.

And my original idea of simply reversing the outputs got nowhere also.

Is there a compromise way forward?

[EDIT] - Just as I finished typing this - I came up with an idea that might work :slight_smile:

Add another option to the dropdown at the bottom that says "allow otherwise to function as a default if in top slot" (or worded better)

Are you sure you don't want "otherwise" to come out of the middle trap sometimes?

Seems to me if this must be done, the only sensible way is a new type "default" which will always be evaluated at the end regardless of where it is in the node config.
And put "default" at the top of the dropdown to save me the effort of scrolling down and down to find "otherwise"

well, yes - my initial need is only for the top but I'd have no problem with it working in any position

There's no consensus on what constitutes the "the only ...way" :slight_smile: hence my post :slight_smile:

:slight_smile: The problem that I forsee in doing that is that == is an obvious 1st choice rule. Having something called "default" as the 1st choice rule isn't going to be good for newcomers. Although I want an easy method of being able to use otherwise/default at the top, I think that's a step too far unfortunately.

1 Like

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