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 gkornbluth - February 9, 2021 - edited: February 9, 2021

Hi All,

Here's an update on the solution to this dilemma.

Seems that Deborah's solution worked all the time.

The issue was that any custom searches end up under the 'more' button, and I was so used to that only showing the per page dialog, that I never looked there.

Thanks to Jenna Cooke for pointing this out and solving the problem.

The search criteria in the section editor that I ended up with which allowed both text searches in the main search field and date searches for updatedDate was:

_all_
Updated Date|updatedDate|query

Hope that helps someone.

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