none
Description of code structure RRS feed

  • Question

  • i've got the next custom structure with description, for example:

    Initiation - First phase

    Planning - Second phase

    Designing - Third phase

    and so on

    1st Phase, 2-nd Phase, 3-rd Phase are description

    Initiation, Planning, Designing I see in custom local field "code structure 1"

    how can i see description in another any custom field?

    Monday, January 31, 2011 11:09 AM

Answers

  • Hi,

    so you will need to use VBA. Try this one:

    Sub Outlinecodedescription()
    Dim T As Task
    For Each T In ActiveProject.Tasks
        If Not T.Summary And Not T Is Nothing Then
            For i = 1 To ActiveProject.OutlineCodes.Item(1).LookupTable.Count
                If T.OutlineCode1 = ActiveProject.OutlineCodes.Item(1).LookupTable.Item(i).Name Then
                T.Text1 = ActiveProject.OutlineCodes.Item(1).LookupTable.Item(i).Description
                End If
            Next i
        End If
    Next T
    End Sub

    Item(1) is referring to OutlineCode1. If you have used another one, you will need to change 1 to the appropriate number.

    Does that help?
    Barbara

    Tuesday, February 1, 2011 8:21 AM
    Moderator
  • Hi,

    If I am interpreting your question correctly, you have a custom lookup table with values Initiation, Planning & Designing and each item has an associated description. 

    The description in the lookup table cannot be associated with another custom field using out of the box capabilities of Project Server.

    However you can access that information programatically using the PSI and the ReadCustomFields2 method, which will return the custom field description as part of the dataset returned.  You can read more on the method at http://msdn.microsoft.com/en-us/library/gg199106.aspx.

    hope this helps,


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Monday, January 31, 2011 12:26 PM
    Moderator

All replies

  • Hi,

    If I am interpreting your question correctly, you have a custom lookup table with values Initiation, Planning & Designing and each item has an associated description. 

    The description in the lookup table cannot be associated with another custom field using out of the box capabilities of Project Server.

    However you can access that information programatically using the PSI and the ReadCustomFields2 method, which will return the custom field description as part of the dataset returned.  You can read more on the method at http://msdn.microsoft.com/en-us/library/gg199106.aspx.

    hope this helps,


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Monday, January 31, 2011 12:26 PM
    Moderator
  • Thanks a lot. But that link about method which not for local project(
    Tuesday, February 1, 2011 7:27 AM
  • Hi,

    so you will need to use VBA. Try this one:

    Sub Outlinecodedescription()
    Dim T As Task
    For Each T In ActiveProject.Tasks
        If Not T.Summary And Not T Is Nothing Then
            For i = 1 To ActiveProject.OutlineCodes.Item(1).LookupTable.Count
                If T.OutlineCode1 = ActiveProject.OutlineCodes.Item(1).LookupTable.Item(i).Name Then
                T.Text1 = ActiveProject.OutlineCodes.Item(1).LookupTable.Item(i).Description
                End If
            Next i
        End If
    Next T
    End Sub

    Item(1) is referring to OutlineCode1. If you have used another one, you will need to change 1 to the appropriate number.

    Does that help?
    Barbara

    Tuesday, February 1, 2011 8:21 AM
    Moderator
  • Thank you very much, Barbara
    Tuesday, February 1, 2011 8:49 AM