筛选#
¥Filter
根据条件筛选项目。如果项目符合条件,“筛选器”节点会将其传递给“筛选器”节点输出中的下一个节点。如果项目不符合条件,“筛选器”节点将从其输出中省略该项目。
¥Filter items based on a condition. If the item meets the condition, the Filter node passes it on to the next node in the Filter node output. If the item doesn't meet the condition, the Filter node omits the item from its output.
节点参数#
¥Node parameters
创建筛选条件以执行筛选。
¥Create filter comparison Conditions to perform your filter.
- 使用数据类型下拉菜单选择条件的数据类型和比较操作类型。例如,要筛选特定日期之后的日期,请选择“日期和时间”>“之后”。
¥Use the data type dropdown to select the data type and comparison operation type for your condition. For example, to filter for dates after a particular date, select Date & Time > is after.
- 要输入到条件中的字段和值会根据你选择的数据类型和比较而变化。请参阅 可用数据类型比较 获取按数据类型划分的所有比较的完整列表。
¥The fields and values to enter into the condition change based on the data type and comparison you select. Refer to Available data type comparisons for a full list of all comparisons by data type.
选择“添加条件”以创建更多条件。
¥Select Add condition to create more conditions.
合并条件#
¥Combining conditions
你可以选择保留项目:
¥You can choose to keep items:
- 当满足所有条件时:创建两个或多个条件,并在它们之间的下拉列表中选择“与”。
¥When they meet all conditions: Create two or more conditions and select AND in the dropdown between them.
- 当满足以下任一条件时:创建两个或多个条件,并在它们之间的下拉列表中选择“或”。
¥When they meet any of the conditions: Create two or more conditions and select OR in the dropdown between them.
你不能同时创建 AND 和 OR 规则。
¥You can't create a mix of AND and OR rules.
节点选项#
¥Node options
- 忽略大小写:是否忽略字母大小写(已启用)或区分大小写(已禁用)。
¥Ignore Case: Whether to ignore letter case (turned on) or be case sensitive (turned off).
- 放宽类型验证:是否希望 n8n 根据你选择的运算符尝试转换值类型(已开启)或不转换(已关闭)。当你的节点遇到 "类型错误:" 错误时,请启用此选项。
¥Less Strict Type Validation: Whether you want n8n to attempt to convert value types based on the operator you choose (turned on) or not (turned off). Turn this on when facing a "wrong type:" error in your node.
模板和示例#
¥Templates and examples
Available data type comparisons#
String#
String data type supports these comparisons:
- exists
- does not exist
- is empty
- is not empty
- is equal to
- is not equal to
- contains
- does not contain
- starts with
- does not start with
- ends with
- does not end with
- matches regex
- does not match regex
Number#
Number data type supports these comparisons:
- exists
- does not exist
- is empty
- is not empty
- is equal to
- is not equal to
- is greater than
- is less than
- is greater than or equal to
- is less than or equal to
Date & Time#
Date & Time data type supports these comparisons:
- exists
- does not exist
- is empty
- is not empty
- is equal to
- is not equal to
- is after
- is before
- is after or equal to
- is before or equal to
Boolean#
Boolean data type supports these comparisons:
- exists
- does not exist
- is empty
- is not empty
- is true
- is false
- is equal to
- is not equal to
Array#
Array data type supports these comparisons:
- exists
- does not exist
- is empty
- is not empty
- contains
- does not contain
- length equal to
- length not equal to
- length greater than
- length less than
- length greater than or equal to
- length less than or equal to
Object#
Object data type supports these comparisons:
- exists
- does not exist
- is empty
- is not empty