Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
So this is a date filter question. I want to have 2 calendar objects FromDate and ToDate - I want the user to click on these and hive it filter the model.
The thing is - I want the MinDate and MaxDate to be set from a 3rd table that has a bunch of information including a date key. I basically want to somehow get the min and max from that other table and use that as a minimum and maximum for my 2 calendar objects. Since there is no data before or after those dates - I only want my 2 calendar objects to be able to display as a minimum and maximum those values.
So for example in Table Values, my min date is 1/1/12 and my max date is 01/08/12. I want my FromDate calendar object to show the earlier date 1/1/12 and my ToDate calendar object I want to show a maximum of 1/8/12.
In all the examples I have seen the MinDate and MaxDate were set manually by the creator of the model.
Thanks!
Hi,
As set in this application along with many other examples, you can use the functions Max() and Min() in the maximum and minimum date definition within the calendar object. Just make sure that all dates are in the same format, and you are done!
Both calendar objects will have these expressions in the min and max values (without quotes)
Minimum: "=Min(Table3.DateField)"
Maximum: "=Max(Table3.DateField)"
Hope that helps.
Miguel