次の方法で共有


ExtendedAttribute 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.

An extended attribute represents a custom field or outline code in Microsoft Office Project. The extended attribute can be a local custom field or outline code, or it can be an enterprise custom field. The definition depends on whether an extended attribute is defined within an ExtendedAttributes collection, or in a Task, Resource, or Assignment. In general, there can be an unlimited number of extended attributes, subject to the limitations described in the Remarks section.

<ExtendedAttribute>
  ComplexTypeValue
</ExtendedAttribute>

Parent Elements

ExtendedAttributesTaskResourceAssignment

Child Elements for the ExtendedAttributes Collection

Element

Required / Optional

Description

FieldID

Optional

Corresponds to the enumeration value of the local custom field (Text1, Text2, and so forth). FieldID is not unique across multiple projects.

FieldName

Optional

Name of the custom field.

CFType

Optional

New in Project 2007. Type of custom field (cost, date, duration, finish, flag, number, start, or text).

Guid

Optional

New in Project 2007. GUID of the custom field.

ElemType

Optional

New in Project 2007. Type of entity (task, resource, or assignment) with which the custom field is associated.

MaxMultiValues

Optional

New in Project 2007. Maximum number of values you can select in a custom field value list

UserDef

Optional

New in Project 2007. Indicates whether the custom field is user defined.

Alias

Optional

Alias of the custom field.

SecondaryPID

Optional

New in Project 2007. Secondary project identifier (PID) of the custom field for assignment roll down.

AutoRollDown

Optional

New in Project 2007. Indicates whether automatic roll down of custom field values to the assignment level is enabled.

DefaultGuid

Optional

New in Project 2007. Specifies the GUID of the default lookup table entry.

Ltuid

Optional

New in Project 2007. GUID of the lookup table associated with the custom field.

PhoneticAlias

Optional

Contains phonetic information in either Hiragana or Katakana for an extended attribute; used only in the Japanese version of Project.

RollupType

Optional

Indicates the method used to calculate roll-ups to summary tasks.

CalculationType

Optional

Indicates whether roll-ups are calculated for task and group summary rows.

Formula

Optional

Formula that Project uses to populate the custom field.

RestrictValues

Optional

Indicates whether only values in the list are allowed in the file.

ValuelistSortOrder

Optional

New in Project 2007. Indicates how value lists are sorted (descending or ascending).

AppendNewValues

Optional

Indicates whether new values added to the project are automatically added to the list.

Default

Optional

Refers to the ID of the default value in the list; not used if there is no default set.

ValueList

Optional

The collection of extended attribute values.

Child Elements for a Task, Resource, or Assignment

Element

Required / Optional

Description

FieldID Element

Optional

Field ID for the extended attribute.

Value Element

Optional

Actual value of the extended attribute.

DurationFormat Element

Optional

An enumeration of the duration format for the extended attribute (day, week, month, and so forth).

ValueGUID

Optional

New in Project 2007. GUID of the value in the custom field value list. The ValueGUID matches the FieldGUID in the Value element, for multi-value custom fields.

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

The following two pieces of data are necessary to specify the value of an ExtendedAttribute in a task, resource, or assignment:

  • A pointer to the extended attribute definition that is specified by the FieldID element.

  • The custom field value, which is specified by the Value element or by the ValueGUID pointer to the Value element in the value list. The ValueGUID matches the FieldGUID in the value list.

If the custom field is of type Duration, the value requires the DurationFormat element. If the custom field is calculated by a formula, ValueGUID shows the following: <ValueGUID>00000000-0000-0000-0000-000000000000</ValueGUID>

NoteNote

When loading a project stored as XML data, Microsoft Office Project recognizes a maximum of 5000 ValueList elements. All others are ignored.

Example

The FieldName value corresponds to PjCustomField enumeration value in the FieldID element. For example, the FieldID 188743731 for the Information local custom field matches the pjCustomTaskText1 value in PjCustomField Enumeration.

NoteNote

The FieldID 205521019 is currently missing in the PjCustomField documentation. However, you can find in the Object Browser in the Project Visual Basic editor (VBE), the value is for pjCustomResourceCost1.

<ExtendedAttributes>
   <ExtendedAttribute>
      <FieldID>188743731</FieldID>
      <FieldName>Text1</FieldName>
      <Alias>Information</Alias>
      <Ltuid>6F76DA0E-4294-467A-9A66-5E2909578CE8</Ltuid>
      <SecondaryPID>255869028</SecondaryPID>
      <DefaultGuid>D2C35FC6-639A-4F88-A1FF-987F432F3A9D</DefaultGuid>
   </ExtendedAttribute>
   <ExtendedAttribute>
      <FieldID>205521019</FieldID>
      <FieldName>Cost1</FieldName>
      <Alias>Extra Cost</Alias>
      <Ltuid>06AC981F-E8E6-4F20-A26F-8A408A36660B</Ltuid>
      <SecondaryPID>255852663</SecondaryPID>
      <AutoRollDown>1</AutoRollDown>
   </ExtendedAttribute>
</ExtendedAttributes>
. . .
<Tasks>
   <Task>
      <UID>1</UID>
      <ID>1</ID>
      <Name>T1</Name>
      . . .
      <ExtendedAttribute>
         <FieldID>188743731</FieldID>
         <Value>Info 1</Value>
         <ValueGUID>D2C35FC6-639A-4F88-A1FF-987F432F3A9D</ValueGUID>
      </ExtendedAttribute>
   </Task>
   </Task>
</Tasks>
. . .
<Resources>
   <Resource>
      <UID>1</UID>
      <ID>1</ID>
      <Name>R1</Name>
      . . .
      <ExtendedAttribute>
         <FieldID>205521019</FieldID>
         <Value>3000</Value>
         <ValueGUID>1EBF58AF-8EF0-400C-8E36-78628FF0E21C</ValueGUID>
      </ExtendedAttribute>
   </Resource>
</Resources>

See Also

Reference

OutlineCode Element

Concepts

ExtendedAttribute Elements and XML Structure

XML Schema for the ExtendedAttributes Element

Task Elements and XML Structure

XML Schema for the Tasks Element

Resource Elements and XML Structure

XML Schema for the Resources Element

Assignment Elements and XML Structure

XML Schema for the Assignments Element

Other Resources

PjCustomField Enumeration