8 Replies Latest reply: Apr 29, 2014 9:28 AM by Josh Good RSS

    Comparative view – Alternate States – Variables – Triggers

    Dave Hudnutt

      A couple months ago I found an article that allowed me to give the users control over the selecting the date range for and followed the suggestions in this post and outside of a minor issue with the back button it has been working fine.


      However, I have a new requirement to implement a comparative view and I’m not successfully incorporating this into the alternate states the comparative view has to use.


      In the stripped-down scrambled version of the application I’m attaching you can see how the comparative view isn’t quite working as I hoped it would.


      Navigate to the ‘Compare’ tab.  Make sure all selections are clear.  Pick August 1, 2013 in the ‘Group A’ start date (top-left) and September 12, 2013 for ‘Group A’ end date (bottom-left).  We’re left with a full-blue bar for August and a half a blue bar for September which is what we want as far as that goes.


      You’ll notice that under ‘Group B’ you can only pick the Start Date.  This is because the requirements state that ‘Group B’ End Date needs to be calculated by taking the number of days between Group A’s start and end date and add those same number of days to whatever Group B’s start date. This also works fine.


      The problem is with the chart.  Given that there is a approximately 1.5 months between the dates in Group A there should be approximately 1.5 months worth of bars rendered on the chart. Pick various start dates for Group B and you can see that the chart does not correctly calculate.  However, if you pick the same Group B start date twice it will show up correctly.


      In the attached file you’ll find (amongst others) six variables: vStartDate, vEndDate, vStartDateGroupA, vEndDateGroupA, vStartDateGroupB and vEndDateGroupB.


      These variables are acted upon in various places:


      Settings -> Document Properties -> Triggers -> Document Event Triggers -> OnAnySelect


      Settings -> Document Properties -> Triggers -> Variable Event Triggers -> {all variables listed above}


      {Each calendar control} -> Properties -> General -> Min Value & Max Value


      Thank you for your consideration in assisting me with this vexing issue.