Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Cms 2.1.4 Update released for Drupal core (2.1.4)! Release: Facets 3.0.6 Minor update available for module facets (3.0.6). Release: Facets 3.0.5 Minor update available for module facets (3.0.5). Release: Pantheon Advanced Page Cache 2.4.1 Minor update available for module pantheon_advanced_page_cache (2.4.1). Release: Flag 5.1.0 Minor update available for module flag (5.1.0). Release: Workbench Email 3.0.8 Minor update available for module workbench_email (3.0.8). Release: Drupal CMS Helper 2.1.4 Minor update available for module drupal_cms_helper (2.1.4). Release: PDFa11y 1.0.9 Minor update available for module pdfa11y (1.0.9). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Module Revived: ЮKassa (YooMoney) для Drupal v7 2.6.1 Module yoomoney_api updated after 7 months of inactivity (2.6.1).

Views filter OR NULL

1 sites Security covered Drupal 10–11

Part of the Views ecosystem · 207 projects

View on drupal.org

This module adds new filter options to Drupal Views that allow you to include results where a field is either a specific value or is empty (NULL). This is particularly useful for situations where certain fields are optional and you don't want to exclude items that haven't had that field filled in.

Views Filter OR NULL extends standard Views filter handlers (string, numeric, date, boolean) with OR NULL operator variants. This solves a common limitation: when using grouped filters, it is impossible to natively combine a condition with OR NULL to include rows where the field has no value.

Features

  • Adds OR NULL variants for every single-value operator in string, numeric, date, and boolean filters (e.g. "Contains OR NULL", "Equals OR NULL", "Less than OR NULL").
  • Each new operator returns rows where the field matches the condition or the field has no value (NULL).
  • Designed for use in grouped filters where fields are optional and NULL rows must not be excluded.
  • Drop-in replacement: the new filter handlers extend the native ones and appear in the Views UI like any other filter.

Use case: A view listing events filtered by a category field. Some events have no category (NULL). Using "Equals OR NULL", the filter returns events of the selected category plus uncategorized ones — impossible with the native "Equals" operator inside a grouped filter.

Post-Installation

No configuration page. After enabling the module:

  1. Open or create a View.
  2. Add a filter on a field (text, number, date, or boolean).
  3. Change the filter handler to the OR NULL variant (e.g. String OR NULL).
  4. Select an operator ending in OR NULL and enter the filter value.

Additional Requirements

Drupal core Views module (included in Drupal core since 8.x). No additional modules or libraries required.

No specific recommendations. The module works out of the box with any Views-based setup, including exposed filters and grouped filters.

Similar projects

Views Filter OR NULL is the only module known at this time specifically targeting the OR NULL operator gap in grouped and exposed filters.

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Jun 21, 2026
1.0.0-beta1 Pre-release 10–11 Jun 3, 2026
1.0.x-dev Dev 10–11 Jun 3, 2026