Skip to content

Conditional Filters

Basic filters select objects based on fixed structural conditions — type, category, Assembly Code. Conditional filters go one step further: they change their scope or output based on the data itself.

These patterns are more powerful than basic filters, and also easier to misuse. Use them only after the earlier filter patterns feel natural.


What you will learn

  • What makes a filter "conditional" and when it is the right tool
  • How to scope a rule to elements where a specific parameter exists
  • How to exclude non-editable families from rule scope
  • How to produce conditional output fields using $exists() and the ternary pattern

Pages in this section

Conditional Filters — Introduction

What conditional filtering is, when it is appropriate, and the common mistakes that come with it.

Filter if Parameter Exists

How to restrict scope to elements where a shared parameter is actually present. Explains the difference between a parameter existing and a parameter having a value.

Filter by isEditable

How to exclude system families and read-only content using values.isEditable. A common first step in production rules that target loadable families only.

Conditional Output Fields

How to include a field in the filter output only when it exists on the object. Introduces $exists() and the condition ? value : null pattern.


Prerequisites

You should already understand: