Skip to content

Filters

A filter defines which objects a DAQS rule applies to and what data is passed to the validation step.

The filter is the most critical part of every rule. A correct validation with an incorrect filter is still a broken rule.


What you will learn

By the end of this chapter, you will be able to:

  • Write a minimal valid filter that satisfies the DAQS data contract
  • Select objects by category, family, and symbol
  • Filter using inclusion and exclusion lists
  • Access domain data such as Assembly Codes
  • Navigate relationships between FamilySymbols and FamilyInstances
  • Write conditional filters that apply only when certain data is present
  • Use advanced patterns for shared parameters and cross-object data enrichment

How this chapter is structured

Overview and Purpose

What a filter does, what it must always return, and why it acts as a contract between the rule, DAQS Assist, and the end user.

Minimal Valid Filter

The smallest possible filter that DAQS will accept. Every filter must return at least id, type, and name.

Filtering Logic

How JSONata evaluates filter expressions and shapes output.

Simple Filters

Filters based on category, family, and symbol — the foundation of most rules.

  • Select by family and symbol
  • Filter by category, family, and symbol combined
  • Filter using multiple categories with OR logic
  • Inclusion lists: only allow specific categories
  • Exclusion lists: exclude specific categories

Domain Data Filters

Filters that use project-specific data such as Assembly Codes and classification systems.

  • Filter by Assembly Code (exact match)
  • Filter by Assembly Code (regex)
  • Filter FamilyInstances by category via Symbol

Filtering by Relationships

Filters that navigate from one object type to another.

  • Filter instances via symbol categories
  • Read a type parameter from an instance

Conditional Filters

Filters that only apply when specific conditions are met — for example, only validate elements that have a certain parameter present.

Power Patterns

Advanced patterns for complex real-world scenarios.

  • Shared parameter access
  • Model-aware shared parameter access
  • Symbol–Instance data enrichment

Prerequisites

Complete Core Concepts first. You must understand the Revit object hierarchy and where data lives before writing filters.


Where to go next

Once your filters consistently return the right shape, continue with:

👉 Validating