Forum Discussion
I did something like this by making two new fields:
[Start Date for Timeline]
[End Date for Timeline]
My start date I wanted to only show it was 4 weeks ago or 90 days ahead, unless the start date was really old, but the project was ongoing, then i just set the start date for exactly 4 weeks ago (just to be sure the start date existed in the realm)
[Start Date for Timeline] =
var date Start = [Start Date]
If(
$Start>Today()-Days(28) and $Start < Today() + Days(90), $Start,
$Start<=Today()-Days(28) and not IsNull([End Date for Timeline]), Today()-Days(28),
null)
End date was only shown for that 4 week to 90 day period. I have 97 in my formula because in the event the start date was 90 days out, then the end date would be 97 days out so at least i would show a week of that project (or else my start and end date in the exact scenario would look like a single day).
var date End = [End Date]
If($End>=Today()-Days(28) and $End < Today() + Days(97), $End)
I think if you change the 28 days to 7 days, and the 90 days to 60 days, that should work for your purposes.
------------------------------
Mike Tamoush
------------------------------
I can see this possibly working if it is a global variable (I don't know that QB has that option). However, how I see what you're saying as a field in the same table as my start and end date for time off. Once the script has a date, it will fill in the field. Not to be re-created untell another trigger happens. I need a trigger to activate when the TimeLine table displays. Or are you placing the script in the TimeLine settings, if so I do not see a way to do this. I am playing with the idea of adding a hidden completed check box field to be selected once the date has passed, then exclude (or include) from a search.
------------------------------
Brian Crowther
------------------------------