B
billmiami2
When a user indents/outdents a task, I would like to trap the event,
find the task's new parent and assign some of the values from the new
parent to the task.
This would be very easy if I had an app_ProjectAfterTaskChange event,
but I don't (why not?). Nevertheless, I'm using the
app_ProjectBeforeTaskChange event and catching the indent/outdent by
testing if Field=pjTaskOutlineLevel. At this point, the task's parent
task is still the old parent task. However, NewVal is the new
OutlineLevel. Unfortunately, given the task's new outline level, I
don't know a foolproof way of finding the task's new parent.
Currently, I'm looping through all tasks and searching for the task
with an outline level of NewVal-1 and a task ID as close to but not
greater than the task's ID. I don't think this will give me a correct
answer in all cases.
I've also tried testing for Field=pjTaskParentTask, but this didn't
work.
Does anyone know a better way for me to do this?
Thanks,
Bill
find the task's new parent and assign some of the values from the new
parent to the task.
This would be very easy if I had an app_ProjectAfterTaskChange event,
but I don't (why not?). Nevertheless, I'm using the
app_ProjectBeforeTaskChange event and catching the indent/outdent by
testing if Field=pjTaskOutlineLevel. At this point, the task's parent
task is still the old parent task. However, NewVal is the new
OutlineLevel. Unfortunately, given the task's new outline level, I
don't know a foolproof way of finding the task's new parent.
Currently, I'm looping through all tasks and searching for the task
with an outline level of NewVal-1 and a task ID as close to but not
greater than the task's ID. I don't think this will give me a correct
answer in all cases.
I've also tried testing for Field=pjTaskParentTask, but this didn't
work.
Does anyone know a better way for me to do this?
Thanks,
Bill