FunctionItem2 node? (JS 2-input-2-output node)

hi, what about a node just like FunctionItem, but with 2 inputs and 2 outputs?

use case: I want to filter / aggregate / check / whatever something, and the IF node is limited to evaluating data within one object against itself.

what if you want to compare data from two different streams? The IF node is nice, but super clumsy for complex logic. I’d rather punch in two or three JS lines than fiddle around with that super weird syntax in IF nodes (for example, what if you do not want to match a RegEx? What if you have a more complex decision tree?). Yes you could chain IF nodes, but … meh. The flexible solution wins :wink:

I changed your topic to a Feature Request.

For the input side, you can do that already with $node and request the data from any node that has been executed before the Function-Node you are currently in.
For the output, you really would have to add an additional property on the items and then use that one in a Switch-Node afterward.

Being able to have multiple inputs and outputs on a Function-Node could for sure be helpful. We have to think at some point about a proper way to do that.

1 Like

wasnt it a feature request? I posted in that group … :astonished:

No was posted as question. But literally takes a second move over so all good now :wink:

I bumped into a similar need where I want inputs of two different streams.
I had to work around it using:

if ($runIndex === 0)
  return // wait for second lane's inputs arriving here