[Feature Request]Help prevent crossing wires from Switch node

I've always been hoping to see the switch node gain a few extra features but things have been very quiet with it for a while now.

One issue I'd like to see resolved is some method of easily getting around this type of crossed wire situation



Obviously, the switch node is a fundemental core node so changing it's behaviour needs a very cautious approach

But a couple of ideas sprung to mind today

  1. Add option to label the outputs 1,2,3,4,5


  1. Add option to reverse them


My feeling is that would cause more problems than it saves, due to getting confused over which way up the particular node is configured.

For the problem, I often use a Link node on the top ones to link down past the nodes attached to o/p 5.

Also, you could use a regex to send it to o/p 1 if it doesn't match any of those strings.

That's the reason for the number labelling :slight_smile:

And it wouldn't cause any issue for anyone who didn't tick a checkmark :slight_smile:

I'm after NOT having to employ extra nodes

And now we have two problems....... :slight_smile:


I think still only one problem, but it is how to code the regex (which is a one off problem, fairly easily solved), instead of the continuing annoyance at the crossing wires. I must admit that a few crossing wires doesn't bother me. In your example I would add another junction further down so there is only one crossing not two.

You must be new here and not have dealt with me before :slight_smile:


In this cases I just use a Link node like a via in PCB design. :man_shrugging:

And with NR 3.x and above, that is nice and easy now



This thread is not about workarounding the fundamental issue :slight_smile:

you could work up the page instead of down then the top links wouldn't cross :slight_smile: nothing says they have to start top left.

1 Like

Get out!!!!!!!!!!

I'll get my coat.... :coat:

1 Like

As I've said - I don't need workarounds - I can easily sort myself out :slight_smile:

1 Like

or simpler

but yeah, whatevs... :slight_smile: time for a :beer:


A rather nice red wine awaits here at Chez Knight, left-overs from Valentines Night meal. :grin:

When life gives you crossed wires, make onion domes:
Untitled 3


Indeed. More of my flows look like that than I care to admit !

Ah, but if only we could get those colours! Maybe in Node-RED v10?



Is it too nitpicky to say that for the specific case you've mentioned, you could move the "otherwise" to the top of the list - assuming you leave it at "checking all rules" and your "contains" doesn't match more than one.

Actually that doesn't seem to work correctly, for me at least. It seems there is a bug in otherwise