Several gurus of the Lotus Notes community ( like Chris Blatnick, Nathan Freeman, Theo Heselmans, Vitor Pereira, and to round it out Kevin Pettitt ) are working on Gantt Charts in Notes Views these days. Nathan Freeman also provided a sample database.
I’ve downloaded the sample and gave it a try. The first thing I found out is that it is not possible to display more than one month in a view because the “zeroDate” – value for the columns is calculated by stripping the last part of the view title and convert it into a DateTime value. The sideeffect of this method is that documents from a different month are displayed in the view but no chart is displayed for these documents.
OK, you can avoid this by setting the view selction formula properly. The second thing is that Nathan uses
zeroDate :=@TextToTime(@Right(@ViewTitle; "-"));
in each of the 62 view columns to calculate the date basis. Maybe a bit ressource performance consuming, isn’t it ?
So I decided to make a few modifications to address these issues. I created a new field in the task form ( “zeroDate”, Date/Time, calculated )
and assigned the following formula to the field:
@TextToTime("[01/"+ @Text(@Month(startDate)) +"/"+ @Text(@Year(startDate)) + "]" )
When you create a new task, the zeroDate field is now set to the first day of the month according to the start date’s month.
You can now delete the unnecessary code from the column formulas and reduce it to
col := 0;
colDate := @Adjust(zeroDate; 0; 0; col; 0; 0; 0);
@If(@Date(startDate) = @Date(coldate); duration; " ")
After adding two categorized columns ( one contains @Year(StartDate) and the other one @Month(StartDate) ) the view displays the charts for each month in a seperate category.
The view can have any name of your choice.
Part of the idea was that the view would be able to show a fairly arbitrary set of contents. If you look at the folder-construction stuff, the idea is that you specify the zero date in the folder control, and it builds the columns based on that. The ViewTitle stuff was just a hack to get a proof of concept done. The folder build actually tunes the formula to hard-code the zero date at the time of building the folder.
That being said, I think this is a great modification. What I’d really like to do is have a “project” doc that specifies starting point and resources, and then you build all the tasks off of that. Each task could have a multi-value “prerequisites” field that provides a list of other tasks which must come first. If it’s a direct series, then you only need to specify the one right before it.
THEN, have it build the start dates based on the lengths specified for each task. That way, you could shift the length of any given task, and have it run through and reset all the subsequent start dates for dependent tasks. Then you start getting close to a real project timeline tool — especially if we made those “duration” columns have in-view edit events.
That being said, I got distracted on my own blog, but I was going to do a writeup about how I’m not sure that this is a terribly useful trick. A Gantt chart really truly ought to be a composite app element in Notes 8. We should ultimately be building an Eclipse/Java tool for Gantt charts that plugs into Notes views with a certain structure. Then we could do stuff like drag-actions for timelengths that drive backend rescheduling events.