Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Views field compare

623 sites Security covered Drupal 10–11 Views ecosystem
View on drupal.org

This module adds two new filters to Views. One filter allows you to compare the values of two different fields using standard operators. The other filter checks if a field's value is contained within or not contained within a multi-valued field.

This project provides two different views filters to allow database fields to be compared.

The first filter will allow two different fields to be compared using the standard comparison operators (<, =, >, <=, !=, >=).

The second filter will allow a field value to be checked against another multi-valued field with the operators of "contained in" or "not contained in".

These filters will only work on views displays that use fields, as the chosen left and right fields will need to be specified in the list of fields (although they may be hidden if necessary).

This module is based on dench0's sandbox module from 2016: Views fields comparison, but has been extended to provide the "contained" filter.

The "contained" filter now works with fields attached to different entity types, and neither field needs to be attached to the base entity type of the view. No check is made on field type, but it obviously does not make much sense to have a filter looking for a text value contained in a multi-valued numeric field.

If you encounter an error with table aliases generated automatically by views, then you will need to apply the Drupal core patch from this issue: Identifiers longer than 63 characters are truncated, causing Views to break.

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
1
Tracked since
Jul 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.1.1 Stable 10–11 Jul 5, 2025