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: Tue, 22 Jul 2008 13:37:03 -0700,    group: microsoft.public.project.developer        back       


Read Project Server 2007 Lookup tables values in C# COM Add-in prj   
I am using Project Server 2007 and Project professional. I created one 
Lookup table Field with Some values. I created a Text Field based on the 
Lookup
 table. The Text Field will be appear in each task(Task Level Text Custom 
 Field). If I open the Project Professional I get the lookup table values in 
the Text
 Field.

 I created a COM Add-in using C#, in which it have to read all the Lookup
 table values.  How I can read all the Lookup table values in the COM Add -in
 Project?


 Please anybody help me.
date: Tue, 22 Jul 2008 13:37:03 -0700   author:   Mani

Re: Read Project Server 2007 Lookup tables values in C# COM Add-in prj   
HI,

I don't think there is a way via the object model, you need to interrogate 
the reporting db. For a custom field called GOV Programs, see the View 
MSPLT_GOV Programs_UserView in the Reporting db. These Views are created 
automatically.

-- 

Rod Gill
Microsoft MVP for Project

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



"Mani"  wrote in message 
news:838D9F94-2F52-4E93-8D7A-90629616F717@microsoft.com...
>I am using Project Server 2007 and Project professional. I created one
> Lookup table Field with Some values. I created a Text Field based on the
> Lookup
> table. The Text Field will be appear in each task(Task Level Text Custom
> Field). If I open the Project Professional I get the lookup table values 
> in
> the Text
> Field.
>
> I created a COM Add-in using C#, in which it have to read all the Lookup
> table values.  How I can read all the Lookup table values in the COM 
> Add -in
> Project?
>
>
> Please anybody help me.
>
>
date: Wed, 23 Jul 2008 09:27:21 +1200   author:   Rod Gill rodATproject-systemsDOTcoDOTnz

RE: Read Project Server 2007 Lookup tables values in C# COM Add-in prj   
The lookup tables and picklists are available via the application object of 
Project Pro from the COM-Addin.  Below is a small example in C#

public void GetPickList(object Field) 
{ 
    Microsoft.Office.Interop.MSProject.Project MyProj; 
    int x; 
    try { 
        if (myproj.Application.CustomFieldValueListGetItem(Field, 
MSProject.PjValueListItem.pjValueListValue, 1) != "") { 
            try { 
                x = 1; 
                DoEvents(); 
                while (!ErrTrap) { 
                    if 
(myproj.Application.CustomFieldValueListGetItem(Field, 
MSProject.PjValueListItem.pjValueListValue, x) != null) { 
                        
                        
debug.print(myproj.Application.CustomFieldValueListGetItem(Field, 
MSProject.PjValueListItem.pjValueListValue, x)); 
                        
debug.print(myproj.Application.CustomFieldValueListGetItem(Field, 
MSProject.PjValueListItem.pjValueListDescription, x)); 
                        x = x + 1; 
                    } 
                } 
            } 
            catch { 
                
            } 
        } 
    } 
    catch { 
        return; 
    } 
} 

Hope this Helps

-- 
Ray McCoppin

http://www.randsmanagement.com
SRS gantt charts
Global Documenter for Project Server 2007


"Mani" wrote:

> I am using Project Server 2007 and Project professional. I created one 
> Lookup table Field with Some values. I created a Text Field based on the 
> Lookup
>  table. The Text Field will be appear in each task(Task Level Text Custom 
>  Field). If I open the Project Professional I get the lookup table values in 
> the Text
>  Field.
> 
>  I created a COM Add-in using C#, in which it have to read all the Lookup
>  table values.  How I can read all the Lookup table values in the COM Add -in
>  Project?
> 
> 
>  Please anybody help me. 
> 
>
date: Wed, 23 Jul 2008 05:50:00 -0700   author:   Ray McCoppin

RE: Read Project Server 2007 Lookup tables values in C# COM Add-in   
Thanks very much for your valuable code.
I have a doubt.. I need to get the ValueList of the Lookup Table "HEALTH". 
How i have to typecast and call your function.
 will you please help me...


"Ray McCoppin" wrote:

> The lookup tables and picklists are available via the application object of 
> Project Pro from the COM-Addin.  Below is a small example in C#
> 
> public void GetPickList(object Field) 
> { 
>     Microsoft.Office.Interop.MSProject.Project MyProj; 
>     int x; 
>     try { 
>         if (myproj.Application.CustomFieldValueListGetItem(Field, 
> MSProject.PjValueListItem.pjValueListValue, 1) != "") { 
>             try { 
>                 x = 1; 
>                 DoEvents(); 
>                 while (!ErrTrap) { 
>                     if 
> (myproj.Application.CustomFieldValueListGetItem(Field, 
> MSProject.PjValueListItem.pjValueListValue, x) != null) { 
>                         
>                         
> debug.print(myproj.Application.CustomFieldValueListGetItem(Field, 
> MSProject.PjValueListItem.pjValueListValue, x)); 
>                         
> debug.print(myproj.Application.CustomFieldValueListGetItem(Field, 
> MSProject.PjValueListItem.pjValueListDescription, x)); 
>                         x = x + 1; 
>                     } 
>                 } 
>             } 
>             catch { 
>                 
>             } 
>         } 
>     } 
>     catch { 
>         return; 
>     } 
> } 
> 
> Hope this Helps
> 
> -- 
> Ray McCoppin
> 
> http://www.randsmanagement.com
> SRS gantt charts
> Global Documenter for Project Server 2007
> 
> 
> "Mani" wrote:
> 
> > I am using Project Server 2007 and Project professional. I created one 
> > Lookup table Field with Some values. I created a Text Field based on the 
> > Lookup
> >  table. The Text Field will be appear in each task(Task Level Text Custom 
> >  Field). If I open the Project Professional I get the lookup table values in 
> > the Text
> >  Field.
> > 
> >  I created a COM Add-in using C#, in which it have to read all the Lookup
> >  table values.  How I can read all the Lookup table values in the COM Add -in
> >  Project?
> > 
> > 
> >  Please anybody help me. 
> > 
> >
date: Wed, 23 Jul 2008 07:30:23 -0700   author:   Mani

Google
 
Web ureader.com


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