Searching records list by updatedDate

8 posts by 3 authors in: Forums > CMS Builder
Last Post: February 9, 2021   (RSS)

By gkornbluth - January 29, 2021 - edited: January 29, 2021

Hi All,

When doing a search through records in a record list, I can’t seem to search for a particular group of records that were updated on a particular date.

Has anyone figured out how to search by updatedDate? Say Jan 5th, 2021 for example.

I tried Jan 5th and also 2021-01-05 with no luck

I looked at post 2244647 but am a bit reticent to do that without asking for some guidance first

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Deborah - January 29, 2021

Hey, Jerry.

I was able to do this after adding the following search field for a specific section:

    Updated Date|updatedDate|query

Then on the list page, I entered YYYY-MM-DD into the "Updated" search field. (Replace YYYY-MM-DD with actual date to search for.)

Hope that works for you.
Deborah

Hi Deborah,

Thanks for the suggestion.

When I replaced _all_ with your suggested search criteria, it allowed me to search on updatedDate

But, when I tried adding Updated Date|updatedDate|query to new line in the search, that didn't work. 

So it seems that, unless I'm doing something wrong, the search is limited to either the new Updated Date|updatedDate|query criteria or _all_ but not both.

Is that your finding as well?

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Deborah - January 30, 2021

Jerry,

I was able to add that field in addition to _all_. (CMSB ver 3.53.)

My search fields are:

    _all_
    Client|client|match
    Due|date_due|match
    Updated Date|updatedDate|query

Maybe the order the fields are listed has some bearing? Try putting updatedDate last in the list. Also refresh the list page search by clicking "show all" after making changes to the list, before testing.

Deborah

Thanks for  getting back, Deborah.

I'll give it a try.

Enjoy the weekend,

Jerry

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hi Deborah,

Couldn't get it to work in 3.54 with more than one line in the search criteria tab.

Not sure why.

Based on the other post, I changing the updatedDate 'type' entry in the schema file from 'none':

'updatedDate' => array(
'order' => '4',
'type' => 'none',
'label' => 'Last Updated',
'isSystemField' => '1',
),

to 'textfield':

'updatedDate' => array(
'order' => '4',
'type' => 'textfield',
'label' => 'Last Updated',
'isSystemField' => '1',
),

That allowed me to keep the search criteria as _all_ and search for specific updatedDates with the format yyyy-mm-dd hh:mm:ss or any portion of that format (like year only or day only, etc.)

I've created new records and modified and deleted old ones with no unexpected errors, but I'd still like a programmer from Interactive Tools to weigh in on this just in case I missed something.

Any thoughts?

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Jenna - February 3, 2021

Hi Jerry,

Would you be able to submit a second level support request for this? https://www.interactivetools.com/support/request/

We would like to take a look and see what's going on. In version 3.54, I am able to have additional lines of search terms after "_all_" without having to change the field type from "none" for "updatedDate" so I'd like to take a look and see what's happening with your install of CMS Builder.

Ideally, we would not want to need to change the field type for default fields. 

I'll keep an eye out for a support ticket from you, and as always, we're happy to help.

Jenna Cooke - PHP Programmer
interactivetools.com