OutlineCode Element

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Defines an outline code and associated value list in a project, or specifies the value of an outline code element for a resource or task.

<OutlineCode>
  ComplexTypeValue
</OutlineCode>

Parent Elements

OutlineCodesResourceTask

Child Elements at the Project Level

Element

Required/Optional

Description

Guid

Required

New in Microsoft Office Project 2007. The globally unique identifier (GUID) of the outline code. Corresponds to the Ltuid element in associated ExtendedAttribute values.

FieldID

Optional

Field ID number for the outline code. Field numbers correspond to Outline Code1, Outline Code2, . . . , Outline Code10, for resources and tasks.

FieldName

Optional

Name of the custom outline code.

Alias

Optional

Alias of the outline code.

PhoneticAlias

Optional

Contains phonetic pronunciation information in either Hiragana or Katakana for a custom outline code; used only in the Japanese version of Project.

Values

Optional

Collection of the value definitions of the outline code.

Enterprise

Optional

Indicates whether the outline code is an enterprise custom field.

EnterpriseOutlineCodeAlias

Optional

Refers to an enterprise custom field for which the outline code is an alias.

ResourceSubstitutionEnabled

Optional

Indicates whether the outline code is used with the Resource Substitution Wizard in Project. The Resource Substitution Wizard is used only with enterprise custom fields.

LeafOnly

Optional

Indicates whether the value specified for an outline code in a resource or task must be a leaf value.

AllLevelsRequired

Optional

Indicates whether new codes must have all levels present. Not used for enterprise custom fields.

OnlyTableValuesAllowed

Optional

Indicates whether the outline code value must come from the associated lookup table.

Masks

Optional

Collection of code masks for the outline code value list.

Child Elements at the Task and Resource Level

Element

Required/Optional

Description

FieldID

Required

Field ID number for the outline code. Field numbers correspond to Outline Code1, Outline Code2, . . . , Outline Code10, for resources and tasks.

ValueID

Optional

Local ID number in the Value list associated with the outline code definition. Required for Project 2003 to read XML files saved from Project 2007.

ValueGUID

Optional

New in Project 2007. GUID of the value in the outline code value list. The ValueGUID matches the FieldGUID in the Value element.

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

An outline code, with the corresponding code mask and table of values, is defined in the collection of OutlineCodes in a project. Each outline code has an associated ExtendedAttribute that specifies the outline code field type and alias.

Resources or tasks that contain outline code values include an OutlineCode element for each value. The following two pieces of data are necessary to specify the value of an OutlineCode element in a resource or task:

  • A pointer to the outline code definition that is specified by the FieldID element.

  • The outline code value, which is specified by the ValueID and the ValueGUID pointer to the Value element in the value list. The ValueGUID matches the FieldGUID in the value list. Project 2007 ignores ValueID and uses ValueGUID.

Example

In the following example, the Guid value in the outline code definition corresponds to the Ltuid value in the associated ExtendedAttribute. The outline code alias is Task Simple OC for the Outline Code6 field name. The FieldID 188744106 matches the pjCustomTaskOutlineCode6 enumeration value in the PjCustomField Enumeration. You can also use the Object Browser in the Project Visual Basic editor (VBE) to find values in the PjCustomField enumeration.

The outline code mask defines one level of characters (Type = 3), of any length (Length = 0).

ValueGUID and ValueID for the outline code in the task both correspond to the Simple 2 value in the Task Simple OC outline code.

<Project xmlns="http://schemas.microsoft.com/project">
   . . .
   <OutlineCodes>
      <OutlineCode>
         <Guid>26F0CA77-38CC-40C7-933D-15F839F7DB82</Guid>
         <Enterprise>0</Enterprise>
         <ResourceSubstitutionEnabled>0</ResourceSubstitutionEnabled>
         <LeafOnly>0</LeafOnly>
         <AllLevelsRequired>0</AllLevelsRequired>
         <OnlyTableValuesAllowed>0</OnlyTableValuesAllowed>
         <Masks>
            <Mask>
               <Level>1</Level>
               <Type>3</Type>
               <Length>0</Length>
               <Separator>.</Separator>
            </Mask>
         </Masks>
         <Values>
            <Value>
               <ValueID>16</ValueID>
               <FieldGUID>985194AB-77BA-4545-BCE8-99761B5538D9</FieldGUID>
               <ParentValueID>0</ParentValueID>
               <Type>21</Type>
               <Value>Simple 1</Value>
            </Value>
            <Value>
               <ValueID>17</ValueID>
               <FieldGUID>6B0CC455-EE19-416A-8FD9-6209590B3ED7</FieldGUID>
               <ParentValueID>0</ParentValueID>
               <Type>21</Type>
               <Value>Simple 2</Value>
            </Value>
         </Values>
      </OutlineCode>
   </OutlineCodes>
   . . .
   <ExtendedAttributes>
      <ExtendedAttribute>
         <FieldID>188744106</FieldID>
         <FieldName>Outline Code6</FieldName>
         <Alias>Task Simple OC</Alias>
         <Ltuid>26F0CA77-38CC-40C7-933D-15F839F7DB82</Ltuid>
         <SecondaryPID>255869013</SecondaryPID>
      </ExtendedAttribute>
   </ExtendedAttributes>
   . . .
   <Tasks>
      <Task>
         . . .
         <OutlineCode>
            <FieldID>188744106</FieldID>
            <ValueID>17</ValueID>
            <ValueGUID>6B0CC455-EE19-416A-8FD9-6209590B3ED7</ValueGUID>
         </OutlineCode>
         . . .
      </Task>
   </Tasks>
   . . .
</Project>

See Also

Reference

Ltuid Element

ExtendedAttribute Element

Concepts

Project Elements and XML Structure

XML Schema for the Project Element

OutlineCode Elements and XML Structure

XML Schema for the OutlineCodes Element

Resource Elements and XML Structure

XML Schema for the Resources Element

Task Elements and XML Structure

XML Schema for the Tasks Element

Other Resources

PjCustomField Enumeration