I have a "membership date" field with an optional enddate and want to create a view showing membership list at a selected date (exposed filter). The basic logic is clear: nodes should appear in the view IF (startdate <= filterdate(exposed) OR startdate is empty) AND (enddate > filterdate(exposed) OR enddate is empty). There are two problems: 1) the enddate apparently defaults to the startdate if the "show end date" checkbox is not activated. 2) the start and enddates are apparently not "NULL" if they haven't been entered, so filtering on "is null" or "is not null" isn't working as expected.

So the filtered view now showing a) nodes with a start date less than or equal to the filter date AND an end date greater than the filterdate (as expected) b) nodes with a start date greater than the filterdate, but no end date (this is NOT expected, but apparently due to the empty enddate being "replaced" by the start date and then fulfilling the condition set for the end date) The view is NOT showing c) nodes with a start date prior to the filterdate but no end date (this is obviously an essential group of nodes!) d) nodes with neither a start or end date (this group should be shown to allow missing data to be completed)

I am looking for some way to identify and filter for nodes with no actual enddate. Any ideas?

  • note: I checked the settings for the date field I am using - the end date has a default setting "same as start date". This means that there is in fact a date (the start date) in the end date column of the field table. Changing the default setting doesn't seem to have any effect at this point - new nodes still default to the start date, and saving an existing node also re-sets manually deleted end dates to the start date as per original default settings. There is a "no default" option for the end date, but maybe this setting cannot be altered once data has been entered. Do I need a new field? – Gary May 29 '14 at 14:03

Your Answer

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

Browse other questions tagged or ask your own question.