Help with filters

S

scott.siegler

Hello,

Is it possible to create a filter such that it filters out tasks if the
parent task has a certain name. I have several indendations, for
example, level 0 may be a project team name, indented from there i have
an "input" subtask, and and "output" subtask. Indented under "input"
and "output" are milestones and tasks.

I want to be able to filter all tasks if the immediate parent task is
named "output". Is this possible?

Any help would be greatly appreciated

Scott
 
J

JackD

Filters work on a row by row basis. You could do this by using one of the
text fields and putting the parent task name in it. This could be done
manually or by using a macro. For examples of macros look the sites in my
signature. I have one which will put the parent task in the child task text
fields.
 
S

scott.siegler

Jack,

Thanks! I used your macro with a slight modification to do exactly
what I needed and it works great!

I was hoping you could help me with one more thing. I also need to
access the parent task of the successor of a task. If there is more
than one successor I just want the first one, but it is possible there
are no successors.

So, my question is 1. How do I check if the successor task array is
empty. For exampl I have :
Set successors = mytask.SuccessorTasks

What is the visual basic command to check if 'successors' has no tasks?

2. Does the array that SuccessorTasks returns, start at index 0 or
index 1? So, if it is not empty, do I want to trace successors(0) or
successors(1)?

Thanks again.

Scott
 
J

JackD

Use count to see if there are no successor tasks

if mytask.successortasks.count = 0 then
msgbox "No successors"
end if

Indexes are not 0 based so the first successor would be:

successors(1)

You would do something like this

dim sucParent as task
set sucParent = successors(1).Parent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top