| Block Group: | Logic |
| Icon: | ![]() |
The hub block outputs the most recently updated value from multiple inputs.
An initial output of a Script block that is set to autorun is an initial value of the property and is not considered a change.
For information on using dataflow blocks, see Dataflow.
The following properties of the Hub block can take input and give output.
input n sets and returns one of the values watched by this hub. An input counts as updated whenever a value is set to it, even if the value is the same as before.
ignoreNull specifies whether null values are ignored. If TRUE, an input that is updated to null does not change the output. The Hub block from the palette has ignoreNull set to TRUE. This property is not shown on the block; edit it in the Properties panel.
The following properties of the Hub block can give output but cannot take input.
index returns the index of the most recently updated input n value. The index is the number in the input's property name, such as 2 for input 2. This property is not shown on the block. Its value is saved, so when the page is loaded again the Hub block outputs the value of the same input.
output returns the value of the most recently updated input n property.
onChange fires each time an input is updated (after the initial load).
The following image shows a Hub block. In this example, Ella deposited at 11:00 a.m., Cara at 1:00 p.m., and Shan at 2:00 p.m. output is the value of Shan’s deposit. Because input 1 is the most recently updated input, index is 1.