Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views field compare

Security covered Under active development 641 sites

Part of the Views ecosystem · 280 projects

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.

Drupal 10–11

Ask your assistant about Views field compare

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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 PHP Release date
1.1.1 Stable 10–11 Jul 5, 2025