how to access data from a summary task

J

Jose X Perez

Hi everyone,
I'm trying to create a task custom field in project 2007 that uses data from
a summary task, and if it is a summary task it must get the value at project
level.

The fields are
Name: project weigh
Entity: project
Type: number

Name: task weigh
Entity: task
Type: number


Name: task weigh calculated (the field that i have problems with)
Entity: task
Type: number
formula:
if it is a sumary task = [task weigh]*[project weigh]
if it is not a sumary task = [task weigh] * [task weigh calculated] of the
sumamry task that the task belongs to.

the formula for the summary task is easy to do, but how can i get the value
of a summary task from a task?

thaks for your help,
Jose X Perez
 
J

Jack Dahlgren

You can not get the value of a summary task in a subtask formula.
You have to use VBA to do this and then it is very simple.
You need to determine which fields hold the task weights first then code
like this:
Of course you need to validate your algorithm. To me it looks a bit
circular.

sub joseXperez()
for each task in active project.tasks
if task.summary then
task.number1 = task.number2 * task.number3
end if
if not task.summary then
task.number4 = task.outlineparent.number1 * task.number2
end if
end sub

-Jack Dahlgren
 
J

Jose X Perez

thanks a lot

Jack Dahlgren said:
You can not get the value of a summary task in a subtask formula.
You have to use VBA to do this and then it is very simple.
You need to determine which fields hold the task weights first then code
like this:
Of course you need to validate your algorithm. To me it looks a bit
circular.

sub joseXperez()
for each task in active project.tasks
if task.summary then
task.number1 = task.number2 * task.number3
end if
if not task.summary then
task.number4 = task.outlineparent.number1 * task.number2
end if
end sub

-Jack Dahlgren

Jose X Perez said:
Hi everyone,
I'm trying to create a task custom field in project 2007 that uses data
from
a summary task, and if it is a summary task it must get the value at
project
level.

The fields are
Name: project weigh
Entity: project
Type: number

Name: task weigh
Entity: task
Type: number


Name: task weigh calculated (the field that i have problems with)
Entity: task
Type: number
formula:
if it is a sumary task = [task weigh]*[project weigh]
if it is not a sumary task = [task weigh] * [task weigh calculated] of the
sumamry task that the task belongs to.

the formula for the summary task is easy to do, but how can i get the
value
of a summary task from a task?

thaks for your help,
Jose X Perez
 

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