0

I have some items that have dates and some that do not. For items that have dates I do NOT want to show items that are past due (ie. events that are before today's date (or 'now' is fine). However I also want to display items that have no dates set.

In my view if I filter on dates I can choose to display events that are on today or later, and that works fine. But then it doesn't display any items that have no dates.

So, my question is, how can I customize my filter to show items with no value for event date as well as items that start on or after 'now'?

1

You can use OR conditions with the filters, and have one group of filters checking for the date value, and the other one checking for empty date field.

You would end up with something like:

*Some filters group you probably have here*
AND
  Date >= NOW
    OR
  Date IS EMPTY

Here is a post for some info on how to work with these - http://www.webomelette.com/drupal-views-filters-and-or-logic

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.