Widgets/Condition

If Between Widget

If Between Widget

A "Condition" type widget. If Between Widget filters numeric values based on a specified range, allowing only numbers within the defined minimum and maximum values (inclusive) to pass through to the "then" output, while numbers outside this range are directed to the "else" output.

 

Inputs

  • in (DataType: Number) The input port accepts numeric values that will be evaluated against the defined minimum and maximum range.

Outputs

  • then (DataType: Number) Numbers that fall within the range (inclusive of min and max values) are sent to this output.

  • else (DataType: Number) Numbers that fall outside the range are sent to this output.


Custom Settings

This widget offers settings to customize the numeric range.

  • Min Value The minimum value of the acceptable range (inclusive).

  • Max Value The maximum value of the acceptable range (inclusive).


Max Value Setting

 

📌 Notes

  • Non-numeric inputs are completely ignored by this widget and will not trigger either output
  • The check is inclusive, meaning that both the minimum and maximum values themselves will pass through to the "then" output

 

Examples

This example uses the If Between Widget to filter temperature values, sending only temperatures between 18°C and 25°C to trigger a "comfortable temperature" notification. Values outside this range trigger a different action.

Drag the example onto the workspace to explore and experiment!



In this example:

  1. The Slider widget generates temperature values (configured with range 18-30°C)
  2. The If Between widget is configured with min=18 and max=25 (Celsius)
  3. When a temperature is within range (18-25°C):
    • The value passes through the "then" output
    • A Text widget displays "comfortable temperature"
  4. When a temperature is outside range:
    • The value passes through the "else" output
    • A Text widget displays "temperature warning"

 

📌 Additional Notes

  • The default range is set to min=1, max=10 if no custom values are provided

 

Glossary

  • Inclusive

    In mathematics, a term indicating that the boundary values (in this case, the minimum and maximum values) are included in the range.