Skip to content

not

Description

The not block performs a logical negation of a single input value. If the input receives the logical value true, the output emits false. If the input receives the logical value false, the output emits true.

The block has one input and one output. It does not require the use of inputs labeled with the tag block.

If the received value cannot be interpreted as a logical value, the block treats it as the absence of a valid logical state and emits null at the output.

Configuration parameters

Parameter name Value
Block duplicated value (filter_duplicated_values) Required boolean value true or false. When set to true, the block does not emit the same result again if it is identical to the current block state. When set to false, each new input change causes the result to be emitted even if it is the same as the previous one.

Input handling

Each new change received on the input is processed independently:

  • logical true causes false to be emitted
  • logical false causes true to be emitted
  • a value that cannot be read as logical true or false causes the result to become null

The block does not use the history of other input connections and does not combine multiple states in any way. The result is always determined only by the value that has just been received.

Ignored cases:

  • when filter_duplicated_values = true and the new input value leads to the same result as the current block state

This means, among other things, that if the block is already in the null state and a non-logical value appears on the input again, such a change will not be emitted again when duplicate filtering is enabled.

Block outputs

The block has one output.

The output becomes:

  • false after receiving the logical value true
  • true after receiving the logical value false
  • null after receiving a value that cannot be interpreted as a logical value

Block status description

The description visible below the block reflects the last processed type of change:

  • null before the first significant change or after receiving a non-logical value
  • true -> false after receiving the logical value true
  • false -> true after receiving the logical value false

Errors visible to the user

The block can display the following error messages:

Error code Error description
Missing filter_duplicated_values configuration. The filter_duplicated_values parameter is missing in the configuration or the parameter cannot be read as a boolean value.
Input disconnected. No other block is connected to the block input.

Examples

  • If true appears on the input, false appears on the output and the block description changes to true -> false.
  • If false appears on the input, true appears on the output and the block description changes to false -> true.
  • If a number, text, or null appears on the input, null appears on the output and the block description changes to null.
  • If filter_duplicated_values = true and two consecutive true inputs appear one after another, the block emits only the first resulting false.
  • If filter_duplicated_values = false and two consecutive true inputs appear one after another, the block emits the resulting false twice.