I want to use a FieldOperator in a Broker Query to select component presentations based on a date in the metadata. For this I use a CustomMetaValueCriteria.
CustomMetaValueCriteria yearCriteria = new CustomMetaValueCriteria(
new CustomMetaKeyCriteria("sort_date"),
new DateTime(Convert.ToInt32(NewsYear), 12, 31),
FieldOperator.LESS_OR_EQUAL_THAN);
It seems the static constants like LESS_OR_EQUAL_THAN, GREATER_OR_EQUAL_THAN and LIKE are not publically available. I’m using SDL Tridion 2011 SP1.
Anyone with a solution?
The field operators are available as static properties of the Criteria class.
E.g.:
etc.