cancel

WEB Drawer Date Search

Burnema
Valued Contributor.

WEB Drawer Date Search

We have added functionality to our search forms to make an additional field called "Run Date" as a required field and we have added a default value of "Last 14 Days".   We have found that last 14 days does not include documents that have a Run Date with today's date.   We also tried "Last 2 weeks", but that seems to ignore all documents from the current week.    Is there a way to make "last 14 days" or similar expression inclusive of today's date? 

Thanks.

 

3 REPLIES
David Churchland
Acclaimed Contributor.

Re: WEB Drawer Date Search

That is strange as 'Last 14 Days' seems to work as you expect on a stock date (such as date registered).  I found that Previous 14 days did a search that included today on an addional field.

 

BTW, I recently added a WebDrawer date range picker plugin, despite the picture the picker currently does not support canned date ranges (such as 'Last 14 Days') but it would not be difficult to add them for anyone who was interested.


Blog | Samples | HPE CM 9.1 SDK Docs
**Any opinions expressed in this forum are my own personal opinion and should not be interpreted as an official statement on behalf of MicroFocus**
Burnema
Valued Contributor.

Re: WEB Drawer Date Search

Thanks for the suggestion of Previous 14 Days.   We tried that, but soon found out that anything over 31 days would throw the following exception.   Also if you try Previous 2 Months, the same error is returned.   We have opted to revert back to Last x days as the default.  Adding today to be inclusive with "Last x days" for additional fields, would be much appreciated in future releases.

ErrorCode: TrimException
Message: The date value specified for this search method is invalid.

Thanks,
MikeB

Burnema
Valued Contributor.

Re: WEB Drawer Date Search

I would like to revisit this issue.  I do not believe this is isolated to WebDrawer.  I have seen the same search results behavior in the desktop client as well.

It appears that if a date field is searched by "Last X days" prior to 12 PM, only records with matching dates from yesterday and earlier are returned.  If the same search is performed after 12 PM, records from today and earlier are returned.   I am going to set up a test of 20 documents with sequential dates.   I will run my test prior to 12 PM and then again after 12 PM. I hope to get this done and posted here tomorrow.

 

=========================================

9:30 AM 2/8/2017 Central Time - Testing update
=========================================

I performed a test this morning.  I had 20 records with a document date (additional field) with a date from 1/20/2017 to 2/8/2017.   I ran the following values for "Document Date"

This Year - returned all 20 records as expected.
Today - returned only 2/8/2017 as expected.
Last 10 Days - returned 10 records from 2/7 back to 1/29/2017.  Expected 2/8 back to 1/30
Last 10 Days to Today - returned 11 records from 2/8 to 1/29/2017
Previous 14 Days - returned 14 records starting with today and ending with 1/26, as expected.

I will run the same tests after 12 PM today and post the results. 

=========================================
12:10 PM 2/8/2017 Central Time - Testing update
=========================================

This Year - returned all 20 records as expected.
Today - returned only 2/8/2017 as expected.
Last 10 Days - returned 10 records from 2/8 back to 1/30/2017 as expected.
Last 10 Days to Today - returned 10 records from 2/8 back to 1/30/2017 as expected.
Previous 14 Days - returned 14 records from 2/8 back to 1/30/2017 as expected.

I captured a video of ech test, but I am not able to attach it to the post.  I can email it to support, if needed.

Thanks,
MikeB