Range
Overview
The Range Filter Component checks whether a given input data falls within a specified range. If the condition is met, the message is passed through the inRange port; otherwise, it is routed to notInRange.
Usage
This component is used to validate whether a text, number, or date is within a predefined range, making it useful for conditional processing in workflows.
Properties
sourceData
string
The data to be checked. Can be a number or date.
rangeMin
string
The minimum value of the range.
rangeMax
string
The maximum value of the range.
exclusiveMin
boolean
If true, the minimum value is excluded from the range.
exclusiveMax
boolean
If true, the maximum value is excluded from the range.
Input Ports
in
Accepts input data and the range values for comparison.
Output Ports
inRange
Emits the message if sourceData is within the specified range.
notInRange
Emits the message if sourceData is outside the specified range.
Processing Logic
Receives Input Data:
Accepts a dataset (
sourceData), minimum (rangeMin), and maximum (rangeMax) values.
Checks for Range Inclusion:
If both values are numbers, compares them numerically.
If both values are dates, checks if
sourceDatafalls within the given range.If
exclusiveMinorexclusiveMaxis set totrue, strict range checks are applied.
Routes the Message:
If
sourceDatafalls within the range, it is passed to theinRangeport.Otherwise, it is passed to the
notInRangeport.
Output Data Schema
sourceData
string
The original data that was checked.
rangeMin
string
The minimum value of the range.
rangeMax
string
The maximum value of the range.
result
boolean
true if sourceData is within the range, otherwise false.
Notes
Supports Numeric & Date Comparisons: Compares numbers and dates effectively.
Configurable Exclusive Boundaries: Allows users to include or exclude boundary values.
Ideal for Conditional Filtering: Useful in workflows requiring validation of a value within a specific range.
This component is essential for workflows that need to filter or route messages based on whether a value falls within a predefined range.
Last updated
Was this helpful?
