Creating an exposed filter with a global custom text field

Created on 3 August 2023, almost 2 years ago
Updated 12 December 2023, over 1 year ago

I have a view where it has content from four different types of content.

Each of those type of content has an SmartDate β†’ field.

In my view I have added each SmartDate field from each type of content. This fields/columns I have set hidden.

For each row/content/node, only one of the four SmartDate field will have a value.

Then, I added a global custom text field to concatenate those four fields in one field.

Now, I want to add a exposed filter to search by this global custom text field.

When I try to add the filter, I'm not able to find this global custom text field.

How I can achieve it?

πŸ’¬ Support request
Status

Closed: works as designed

Version

10.0 ✨

Component
ViewsΒ  β†’

Last updated about 13 hours ago

Created by

πŸ‡ͺπŸ‡ΈSpain intersarsi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @intersarsi
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Us an or group and add the four individual fields

    Under the hood this maps to SQL OR conditons

  • πŸ‡ͺπŸ‡ΈSpain intersarsi

    I'm sorry,

    Could you specify the steps about how I can create? I don't achieve to find the options on the view.

  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Exposed filters can only search in 1 field at a time (with the exception of the Combined field filter but that only works for text fields normally, but if you want to search on the exact content of your date fields it might work)

    If you are using something like Search API you could try using an Aggregated field or if you can write custom code, you could try writing a Computed base field that grabs all the data you need and then searching on that Computed base field.

    But with just Drupal core, this can't be done like this.

Production build 0.71.5 2024