Show tasks on Timeline view based on custom column


I came across this question in MPUG Discussion forum and thought my answer to this question will address those who are looking for option to show tasks on Timeline view based on custom field or another field

Question: I’ve created a project schedule that includes a custom column that indicates what phase of the project the task belongs to – planning, development, release, marketing, etc. I’d like to be able to select one or many of the phases to display on the timeline, for example, display the planning & development dates or show the release & marketing dates. Does anyone know how I might be able to achieve this? Source link

Answer: You can select one or more tasks and add them on Timeline view. You can also use the Display on Timeline checkbox in Task Information to display/hide the task in Timeline. The question raised by this user is very unique, as you wants to add tasks based on the value of a custom field in this case the phase name custom field.

My suggestion would be use to a small macro and it could do the job easily.

1. Click View tab. Click Macros dropdown and select Visual Basic

image12.png?w=640

2. In the editor, double click your current project on the left panel. This will display the code editor.

3. Now, insert a procedure named addTasksOnTimeLine by selecting Insert menu, and then Procedure.

4. In the sub routine, the first for loop removes all tasks (ActiveProject.Tasks) from the time line and the second for loop adds tasks in the current view (ActiveSelection.Tasks) to the Timeline view

5. Change the current view to Gantt Chart view with/without Timeline view

6. Apply a filter or use the AutoFilter dropdown on the custom field to filter the tasks matching the phase name

7. Run the macro. Click Macros dropdown and select View Macros. Select the macro addTasksOnTimeLine and click Run button

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s