This topic presents an example that illustrates a technique for adding codes or user defined fields that have spaces in the field names. This technique involves adding a topic attribute to the Field element when you add the field to the ExtraMetaData.xml file.
Note: The NotebookTopic must exist in P6 database. End user can use the data setup utility to create a NotebookTopic.
2. Add a FieldCategory for "Note" in P6MetaData.xml.
<FieldCategory>
<Name>Note</Name>
<Description>Maps to Project Note or Activity Note in P6 side</Description>
</FieldCategory>
3. Add a field under Activity in P6ExtraMetaData.xml, PDIExtraMetaData.xml and ERPMetaData.xml. For example, if I created or have a NotebookTopic with "Lessons Learned" as the name in P6 database:
The field element in P6ExtraMetaData.xml should be defined as follows:
Note: The value of the "topic" attribute is the NotebookTopic name.
<Field category="Note" topic="Lessons Learned">
<Description>An activity note field to store notes.</Description>
<Name>LessonsLearned</Name>
<Type>String</Type>
</Field>
The field element in PDIExtraMetaData.xml should be as follows:
<Field>
<Description>An activity note field to store notes.</Description>
<Name>LessonsLearned</Name>
<Type>String</Type>
</Field>
The field element in ERPMetaData.xml should be as follows:
<Field>
<Description>The long text value.</Description>
<Name>LessonsLearned</Name>
<Type>String</Type>
</Field>
Add a FieldMap element for Activity, in ERPFieldMapTemplate.xml file as follows:
<FieldMap>
<Guest>LessonsLearned</Guest>
<Host>LessonsLearned</Host>
<PDI>LessonsLearned</PDI>
</FieldMap>
To assign a note to an Activity, add a "LessonsLearned" element as follow under the Task(Activity) element(refer to E-1922.xml file which is a sample input data for Import Project flow ).
<Task>
<ElementId>2056</ElementId>
<Id>T-2056</Id>
<ActivityShortText>Planning</ActivityShortText>
<WBSElementId>E-1922-1</WBSElementId>
<LessonsLearned>Add lessons learned notes to current activity.</LessonsLearned>
</Task>
The "<LessonsLearned>Add lessons learned notes to current activity.</LessonsLearned>" node will be converted to an ActivityNote object.