Problem with date search


(Mahearnpad) #1

Matrix Version:5.3.2

Hi

I have a metadata field called “EffectiveDate”, which is in the format Y-m-d. I have another metadata field, called “PublicationYear” which has as its default value, the following: %metadata_field_EffectiveDate^maxchars:4%. So the intention of this is to just store the 4-digit year, from the first metadata field.

I have set up a search page which has as it’s search field, the PublicationYear metadata field. I can verify that this field contains the 4-digit year (did this with an asset lister). But for some unknown reason, the search page will not match the year I’m passing to it from a search form. I’ve tried everything, including using Postman.

Any ideas??

TIA


(Mahearnpad) #2

I’ve solved this myself. Bloody stupid error. Called the input “queries_PublicationYear_query” instead of “queries_publicationyear_query”. Live and learn!