Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: Mon, 1 Sep 2008 10:00:42 -0500,    group: microsoft.public.project.developer        back       


Adding custom fields   
Hello all.

I have this application that will create a project in project server 2007.
While I've been able to create the project, I want to add custom fields to
the project. So, I think that by calling
ProjectDataSet.ProjectCustomFields.NewProjectCustomFieldsRow for creating a
row, and then AddProjectCustomFieldsRow it would be enough.

However, I'm not quite sure how to fill the row's data. I'm not sure what to
put in ProjectcustomFieldsRow.CUSTOM_FIELD_UID, CODE_VALUE, TEXT_VALUE,
MD_PROP_ID, etc.

Would anybody please guide me on what should I put in this properties? I've
been googling for hours and though I've found examples they do not explain
what those fields are for.

By the way, the project server is configured so that these fields actually
show (empty) even if I do not add the custom fields, so now I'm wondering
whether I should AddProjectCustomFieldsRow or simply modify them. If so, how
could I know which row belongs to which custom field?

Thanks in advance.

Regards,
FG.
date: Mon, 1 Sep 2008 10:00:42 -0500   author:   Fernando A. Gómez F.

Re: Adding custom fields   
I can't help with PSI, but custom fields in Project Professional are not 
added when you create a new project, they are there automatically. I suggest 
therefore you explore modifying their values rather than adding them. Adding 
a custom field suggests adding one to the entire Project Server instance.

-- 

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



"Fernando A. Gómez F."  wrote in message 
news:81B173D3-BAD8-45A3-A402-FD463599B667@microsoft.com...
> Hello all.
>
> I have this application that will create a project in project server 2007.
> While I've been able to create the project, I want to add custom fields to
> the project. So, I think that by calling
> ProjectDataSet.ProjectCustomFields.NewProjectCustomFieldsRow for creating 
> a
> row, and then AddProjectCustomFieldsRow it would be enough.
>
> However, I'm not quite sure how to fill the row's data. I'm not sure what 
> to
> put in ProjectcustomFieldsRow.CUSTOM_FIELD_UID, CODE_VALUE, TEXT_VALUE,
> MD_PROP_ID, etc.
>
> Would anybody please guide me on what should I put in this properties? 
> I've
> been googling for hours and though I've found examples they do not explain
> what those fields are for.
>
> By the way, the project server is configured so that these fields actually
> show (empty) even if I do not add the custom fields, so now I'm wondering
> whether I should AddProjectCustomFieldsRow or simply modify them. If so, 
> how
> could I know which row belongs to which custom field?
>
> Thanks in advance.
>
> Regards,
> FG.
>
>
date: Tue, 2 Sep 2008 09:20:33 +1200   author:   Rod Gill rodATproject-systemsDOTcoDOTnz

Re: Adding custom fields   
"Rod Gill" <rodATproject-systemsDOTcoDOTnz> escribió en el mensaje de 
noticias news:eptDViHDJHA.3668@TK2MSFTNGP05.phx.gbl...
>I can't help with PSI, but custom fields in Project Professional are not 
>added when you create a new project, they are there automatically. I 
>suggest therefore you explore modifying their values rather than adding 
>them. Adding a custom field suggests adding one to the entire Project 
>Server instance.
>
> -- 
>
> Rod Gill
> Microsoft MVP for Project
>

Oh, I see. So, if I'm to set up the value of EF, I'd have to --say-- read 
the project and simply modify the columns, right? I'll try that. Thanks!

Regards,
FG.
date: Tue, 2 Sep 2008 10:06:22 -0500   author:   Fernando A. Gómez F.

RE: Adding custom fields   
There is sample for  TEXT_VALUE if you wand to modify different type you 
should set BOOL_VALUE, NUM_VALUE, DATE_VALUE.




     public ProjectWebSvc.ProjectDataSet SetProjectCustomFieldValue(Guid 
ProjectGUID, ProjectWebSvc.ProjectDataSet prDataSet, 
CustomFieldsWebSvc.CustomFieldDataSet.CustomFieldsRow field, String 
string_value)
        {

            ProjectWebSvc.ProjectDataSet.ProjectCustomFieldsRow row = 
FindProjectCustomField(ProjectGUID, prDataSet, field.MD_PROP_UID);
            if (row == null)
            {
                Console.WriteLine("Field " + field.MD_PROP_NAME + " not 
found");
                row = 
prDataSet.ProjectCustomFields.NewProjectCustomFieldsRow();
                row.MD_PROP_UID = field.MD_PROP_UID;
                row.CUSTOM_FIELD_UID = Guid.NewGuid();
                row.TEXT_VALUE = string_value;
                row.PROJ_UID = ProjectGUID;
                row.MD_PROP_ID = field.MD_PROP_ID;
                row.FIELD_TYPE_ENUM = field.MD_PROP_TYPE_ENUM;
                prDataSet.ProjectCustomFields.AddProjectCustomFieldsRow(row);
            }
            else
            {
                row.TEXT_VALUE = string_value;
            }

            return prDataSet;
        }
-- 
Blog: http://www.projectserver.cz


"Fernando A. Gómez F." wrote:

> Hello all.
> 
> I have this application that will create a project in project server 2007.
> While I've been able to create the project, I want to add custom fields to
> the project. So, I think that by calling
> ProjectDataSet.ProjectCustomFields.NewProjectCustomFieldsRow for creating a
> row, and then AddProjectCustomFieldsRow it would be enough.
> 
> However, I'm not quite sure how to fill the row's data. I'm not sure what to
> put in ProjectcustomFieldsRow.CUSTOM_FIELD_UID, CODE_VALUE, TEXT_VALUE,
> MD_PROP_ID, etc.
> 
> Would anybody please guide me on what should I put in this properties? I've
> been googling for hours and though I've found examples they do not explain
> what those fields are for.
> 
> By the way, the project server is configured so that these fields actually
> show (empty) even if I do not add the custom fields, so now I'm wondering
> whether I should AddProjectCustomFieldsRow or simply modify them. If so, how
> could I know which row belongs to which custom field?
> 
> Thanks in advance.
> 
> Regards,
> FG.
> 
>
date: Wed, 3 Sep 2008 11:46:05 -0700   author:   Martin Winzig

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us