Projector query filters with optional request parameters?

Topics: General, Troubleshooting
Jun 14, 2012 at 5:32 PM

I'd like to create a query where some filter parameters (coming from the request token) are optional.

E.g. what I'd like to do:

  • List pages with creation date less then the request parameter "endDate"
  • If there is no "endDate" parameter, list all pages

Now the first one is simple and works (a content type filter and a tokenized filter on CreationDate in a single group), but if there is no parameter present, nothing is displayed. Actually I get an ADOException "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value." from ProjectionManager ln 109. I guess this is because the inserted date is 2999-12-31 22:59:59...

Adding an additional group that would just fetch all the pages doesn't help.

Is this possible without separate queries for the two scenarios? Thanks in advance.

Jun 18, 2012 at 8:50 AM

Anybody with an idea?

Jun 18, 2012 at 11:56 PM

That sounds almost like a bug to me. We should revert to a user-provided default in those cases I think. Please file a bug and we'll sort it out.

Jun 19, 2012 at 9:20 AM
Edited Jun 19, 2012 at 2:53 PM

Thanks, I've opened one here.

I think I'll just solve this with a custom filter for now.