Filter on empty date fields

Hello everyone,

I want to filter some records on where a certain datefiels is not jet filled.
I can find all kinds of filters if a enable range search… but not where date is empty.

I found an article for a fix in sugarcrm, but i believe suitecrm is not the same in this case.
https://sugarclub.sugarcrm.com/explore/enterprise-professional/f/enterprise-professional-questions/2633/filter-on-empty-date-in-listview

Anyone know how to help?

Thanks,

Tom

Hi,

I’ve had a look around and maybe found some steps in the right direction
There may be one or two options to achieving this:

The first i’ve found would be to add it as a Date format parameter

You would be able to add the dropdown option by doing the following:

Navigate to /custom/include/language/en_us.lang.php

And, adding the following:

<?php

$GLOBALS['app_list_strings']['date_range_search_dom']+=array (
  'is_empty' =>'Is Empty',
);

This will append the option “Is Empty” to the list of operators

However, I’m not sure how to link this up to ensure it filters out non-empty values.
It looks like we may have to make additions to the Timedate.php file, though I’m not certain how this would work. (Though I’ll keep investigating)


Option 2 may be to add a new field to the SearchFields.php, and use the "sub_query" functionality to allow you input your own DB Query as a search parameter I've found a brief description of this here:



Although, if anyone with more in-depth knowledge around this has any other suggestions, they’re very much welcome :smiley:

Hey John,

Thanks for your reaction. I will look in to it and reply back if I’m closer to the answer.

Tom