Task Usage Custom fields (Text1, etc.) - Project 2007

F

franklin

I have posted similar question on Developer site but haven't received
positive response.

Can anyone here tell me how to refer to the custom field values in Task
Usage view? For instance the Text1 field value in the Task Usage table.

As I have it there are three Text1 values:
Task.Text1 is specified in the Gantt table (Taks entry)
Assignment.Text1 is specified in the Resource Usage table
Then there is the third Text1 value displayed on the Task Usage table (along
with Task.Text1) but I can't get to the VBA code to refer to this field.

Input would be much appreciated!
 
N

NZ Projects

You have to use the SetField and GetField methods. Additionally, you have to
use the FieldNameToFieldConstant method. Take a look at the following
example. Let's suppose your enterprise field name is "E_TASK_Number1" and
you want to set the value of this field for the project summary task. Your
code would look similar to:


Sub Test()

ActiveProject.ProjectSummaryTask.SetField
Application.FieldNameToFieldConstant("E_TASK_Number1"), "480"

End If

You can use the GetField method to read a property. Currently, there isn't
a way to do the same for assignments.
 
F

franklin

Thanks for the feedback. I figured that SetField and GetField is not
applicable to Assignments - very unfortunate! Thus decided to work with the
standard Text1, Number1, ... values.

At least thought one would be able to programatically (VBA) refer to these
assignment values as per the Task Usage table (they contain the field values
as per PWA My Tasks), but all efforts seem to fail...
 

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