dglux5_wiki:dataflow:dataflow_blocks_reference:logic:router

Action unknown: plugin_bookcreator__addtobook

Router

Block Group: Logic
Icon:Router block icon

The Router block forwards an event to a destination, which is selected by evaluating an input condition. The important differences between the Router block and the Case block are (1) the Router block provides multiple exit points, while the Case block has a single exit and (2) the Router block is bound to an event.

For information on using dataflow blocks, see Dataflow.


The following properties of the Router block can take input and give output.

  • op (enum)
  • condition
  • event
  • singleOutput (bool)
  • case n

op specifies the comparison or text operator to be applied to the condition to test against the specified cases: =, >, <, >=, ⇐, contains, startsWith, endsWith, or regexp. These work the same way as in the Case block. Cases are tested in order, and the event is forwarded to the output n of the first case that evaluates to TRUE.

condition is the incoming value that is to be compared with each test value.

event specifies the event that triggers the block. You can bind only a single event to a Router block. If you want several different types of events to trigger the same Router block, use a Hub block to coalesce the events to a single output event.

singleOutput When singleOutput is set to TRUE, the previously used output is set to null when an event is routed to a different output, so only one output holds a value at a time. By default, outputs retain their value between evaluations.

case n specifies a test value to compare with the incoming condition. Click the plus sign to add a case/output pair.


The following properties of the Router block can give output but cannot take input.

  • output n
  • else

output n receives the event value if case n is the first case that evaluates to TRUE. The output can be forwarded to multiple destinations.

else receives the event value if none of the expressions evaluates to TRUE.


If a Router block contains the following logic and its event is bound to the onMouseClick event for a button, then when a user clicks the button, the Router logic evaluates the value of the condition and calls one of three scripts according to the result.


  • dglux5_wiki/dataflow/dataflow_blocks_reference/logic/router.txt
  • Last modified: 2026/10/22 13:24
  • by 127.0.0.1