Variable Constraint enforcement on Calendar Objects vs Input boxes
I'm having an issue and I think I am just looking for a shoulder to cry on and confirmation that I am not crazy for expecting this to work a certain way.
Here is what I am trying to do.(I am on QV10 SR4)
I have a conformed calendar dimension and my users don't always like to use the YQM list boxes to get the data they want. They would like to be able to enter a date range and show activity for the range. I thought this was a reasonable request so I set out to build a prototype.
I have two variables shown in Calendar objects. The user may select any date within the range of the calendar table and I am able to use triggers on the variable to set the selection on the date field to the date range defined in the variables.
The Part that has me concerned is when I enter an end date that is less than the begin that the range selection is no longer a date span but rather the top and bottom of the table with a gap in the middle. This does not seem like the selection behavior I was expecting, when I enter >=1/1/2010<=12/31/2010 I get a range but when I enter >=12/31/2010<=1/1/2010 I get all but those between my two dates. This is weird behavior but I can live with it.
To solve the problem I decided to set some constraints on the variables so the Start Date may only be Less than or equal to the End Date and vice versa. I thought this would be a simple fix but the Calendar object will not evaluate the constraint I had set on the variable.
I have attached a sample, you can see when you change the value of the start or end date using the Calendar Selectors then the contraints are not evaluated but if you change them using the input box then the constraints are enforced.
Suggestions for work arounds or corfirmations that I am insane are welcome.
Re: Variable Constraint enforcement on Calendar Objects vs Input boxes
While not an answer to your question about applying constraints on the the calendar, I can give some pointers on applying constraints to the input box dates. There is a complete example "User selectable dates using Input Box" in the QV Cookbook. The constraints test that the input: