Share via


GoalArea Element

In the Project Guide for Microsoft® Office Project 2003, the gbui.xml file defines the goal areas. The GBUIStructure parent element can include multiple GoalArea elements. Each GoalArea element defines the Project Guide side panes displayed for the tasks or activities in that goal area. All of the GoalArea elements together define the content and structure of the Project Guide.

Following is the schema definition of a single GoalArea element:

<element name="GoalArea">
  <complexType>
    <element name="GoalAreaID" type="decimal"  />
    <element name="GoalAreaName" type="string" />
    <element name="GoalAreaDescription" type="string" minOccurs="0" />
    <element name="URL"  type="string" />
    <element ref="RelevantViews" minOccurs="0" />
    <element ref="GoalAreaTask" maxOccurs="*"/>
  </complexType>
</element>

Each GoalArea element contains the following elements:

  • GoalAreaID    The goal area's unique ID. Each goal area must have a unique ID.

  • GoalAreaName    The name of the goal area on the Project Guide toolbar.

  • GoalAreaDescription    Introductory text that appears at the beginning of a goal area side pane. It conveys the main purpose of the goal area and the activities within it. The goal area description is optional.

  • URL    HTML page that appears for each goal area. This page is displayed when the user clicks on that goal area in the Project Guide toolbar. The pages used for the default goal areas only include a script function that dynamically lists all the tasks within the goal area on the page. The Project Guide 101 download includes the HTML pages for the four default goal areas.

    To customize the look of the Project Guide and associate a stylesheet or background image with the different goal areas, you can customize the pages for each goal area. Customization is explained in more detail in the section Customizing the Project Guide.

    The URL element in the GoalArea definition points to the HTML page for the goal area. A custom protocol references the HTML pages for the default Project Guide. For more information, see Custom Protocols and Localization.

  • RelevantViews    The optional RelevantViews element defines the views that are relevant to a particular goal area. For more information, see RelevantViews Element.

  • GoalAreaTask    The GoalAreaTask element corresponds to a specific Project Guide side pane. For more information, see GoalAreaTask Element.

RelevantViews Element

You can use RelevantViews to filter views for a goal area or a goal area task. For example, when the user is in the Tasks goal area, resource views are not relevant. The RelevantViews that are defined for the Tasks goal area include only views of type Task. When the user switches to a view that is not relevant, the ViewChanges element specifies the next goal area or side pane. In this way, content in the side pane always stays relevant to the main view in Project. For a discussion about the use of RelevantViews in a sample Project Guide, see Relevant Views in The Project Guide Content Schema.

Any GoalArea or GoalAreaTask element can have a RelevantViews child element. View checks are inherited from the parent hierarchy. If a GoalAreaTask has no RelevantViews node, then the RelevantViews specified in its parent GoalArea is applied to the GoalAreaTask instead. RelevantViews elements can contain one of three types of view declarations; each type specifies the view differently:

  • ViewType declares whether task or resource views are relevant. A ViewType of 0 indicates task views, 1 indicates resource views, and -1 indicates that no view is relevant. ViewType should be -1 for any GoalAreaTask without relevant views to ensure that the GoalArea relevant views aren't applied to the GoalAreaTask.
  • ViewScreen contains a number taken from the object model's pjViewTypeEnum type.
  • ViewName contains the view name.

Note  For the Resources goal area, both task and resource views are considered relevant. Some tasks in Resources, such as assigning resources, require a task view; other tasks require a resource view. Similarly, for the Track and Report goal areas, both task and resource views are considered relevant.

Following is the schema definition of the RelevantViews element:

<element name="RelevantViews">
  <complexType>
    <element name="ViewType" minOccurs="0" maxOccurs="*">
      <simpleType>
        <restriction enumeration="-1 0 1" />
      </simpleType>
    </element>
    <element name="ViewScreen" minOccurs="0" maxOccurs="*">
      <simpleType>
        <restriction enumeration="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" />
      </simpleType>
    </element>
    <element name="ViewName" type="string" minOccurs="0" maxOccurs="*" />
  </complexType>
</element>

A RelevantViews element can contain any number of ViewType, ViewScreen, or ViewName child elements. For the Tasks goal area, all task views are relevant, so the RelevantViews element for this goal area is defined as follows:

<RelevantViews>
  <ViewType>0</ViewType>
</RelevantViews>

The child elements of RelevantViews are combined using the OR operator when a particular view is relevant to a goal area or a Project Guide side pane. For example, if RelevantViews for a goal area or Project Guide side pane is defined as the following, then any resource view or a view of screen type Task Usage is considered relevant (see the table of ViewScreen enumeration values):

<RelevantViews>
  <ViewType>1</ViewType>
  <ViewScreen>14</ViewScreen>
</RelevantViews>

Goal areas tend to have a broad category of relevant views, such as all task views. Individual activities within a goal area often have more specific view requirements. Therefore, RelevantViews for a Project Guide side pane can be restricted to a particular set of ViewScreens, or even a specific ViewName. The GoalAreaTask element defines RelevantViews for Project Guide side panes.

Note  The RelevantViews element is optional, so if it is not defined at all for a goal area or Project Guide side pane, no views are considered relevant. In this case, as soon as the user switches to a different view, the content in the side pane changes, as specified in the ViewChanges element.

GoalAreaTask Element

Each GoalArea element usually contains several GoalAreaTask elements. Each GoalAreaTask element corresponds to a task within that goal area and a specific side pane. Following is the schema definition of the GoalAreaTask element:

<element name="GoalAreaTask">
  <complexType>
    <element name="TaskID" type="decimal" />
    <element name="Title" type="string" />
    <element name="TaskName" type="string" />
    <element name="URL" type="string" />
    <element ref="TaskHelp" minOccurs="0" />
    <element ref="RelatedTask" minOccurs="0" maxOccurs="*" />
    <element ref="RelatedActivity" minOccurs="0" maxOccurs="*" />
    <element ref="RelevantViews" minOccurs="0" />
  </complexType>
</element>

Following are the child elements of GoalAreaTask:

  • TaskID    Each GoalAreaTask must have a unique ID. TaskIDs should be unique across all goal areas, not just within any single goal area.

  • Title    The Title string is displayed in the Header area at the top of each Project Guide side pane. Typically, this string is shorter than TaskName to prevent the title from wrapping.

  • TaskName    The TaskName string is used to represent the task in its parent goal area side pane. Typically, these strings are longer because they may wrap. For example, the side pane for listing the tasks in a project uses the title List tasks and uses a longer TaskNameList the tasks in the project (in the following figure, the title is partly covered by the drop-down list of tasks).

  • URL    Just as for goal areas, the URL element for a GoalAreaTask points to an HTML page. Each GoalAreaTask has an HTML page that contains the content to be displayed in the side pane for that task.

  • TaskHelp    The TaskHelp element defines additional Help content for a GoalAreaTask. Many of the default Project Guide side panes offer detailed assistance that can be accessed by clicking a help link at the bottom of the side pane. The schema definition of the TaskHelp element is as follows:

    <element name="TaskHelp">
      <element name="HelpName" type="string" />
      <element name="URL" type="string" />
    </element>
    

    HelpName defines the display name for the Help link (shown as More Information for all default Project Guide side panes), and URL points to the HTML page containing the Help content. Following is an example of TaskHelp for the Project Guide side pane List the tasks in the project:

    <TaskHelp>
    <HelpName>More Information</HelpName>
    <URL>gbui://create_tasks_list_hlp.htm</URL>
    </TaskHelp>
    

    The TaskHelp element is optional, so if it is not defined for a GoalAreaTask, a Help link is not displayed at the bottom of that task.

  • RelatedTask    The RelatedTask element is used to reference other GoalAreaTasks that may be related to or pertinent to a specific GoalAreaTask. For example, when listing the tasks in a project, you may also be interested in adding more information such as notes or hyperlinks to tasks. Therefore, you would define the task Link to or attach more task information as a RelatedTask to List the tasks in the project. A RelatedTask must be a defined GoalAreaTask in the Project Guide. Related tasks are displayed in the drop-down menu beside each goal area in the Project Guide toolbar (see the following figure).

    Following is the schema definition for the RelatedTasks element:

    <element name="RelatedTask" >
      <element ref"="TaskID" />
    </element>
    

    TaskID must correspond to the TaskID of another GoalAreaTask in the XML content file. For example, following is RelatedTasks for List the tasks in the project:

    <RelatedTask>
      <TaskID>6</TaskID>
    </RelatedTask>
    

    RelatedTask elements are optional; if no related tasks are defined for a GoalAreaTask, nothing is shown in the Project Guide toolbar goal area drop-down menu when that task is selected. A single GoalAreaTask can contain multiple RelatedTask elements; in that case the Project Guide toolbar goal area drop-down menu displays each element separately.

  • RelatedActivity    The RelatedActivity element is used to reference related or pertinent activities that are not defined GoalAreaTasks in the Project Guide, but correspond to Microsoft Visual Basic® for Applications (VBA) methods in the Project object model.

    For example, creating a recurring task is relevant when you are listing the tasks in your project. There is no GoalAreaTask in the default Project Guide that corresponds to creating a recurring task, but there is a VBA method, RecurringTaskInsert, that brings up a dialog box where you can enter recurring tasks. This is defined as a RelatedActivity for the GoalAreaTaskList the tasks in the project.

    Following is the schema definition for the RelatedActivity element:

    <element name="RelatedActivity">
      <element name="ActivityName" type="string" />
      <element name="VBAMethod" type="string" />
    </element>
    

    ActivityName represents the activity in the Project Guide toolbar goal area drop-down menu. VBAMethod is the name of the Project object model method that should be executed for that activity. For example, the following XML fragment specifies a RelatedActivity for the GoalAreaTaskList the tasks in the project:

    <RelatedActivity>
      <ActivityName>Create a Recurring Task ... </ActivityName >
      <VBAMethod>RecurringTaskInsert</VBAMethod>
    </RelatedActivity>
    
  • RelevantViews    See RelevantViews Element.

RelatedTask and RelatedActivity are both optional. The following figure shows one RelatedTask and one RelatedActivity for the task List the tasks in the project. A single GoalAreaTask can also contain multiple RelatedActivity elements.

RelatedTask and RelatedActivity for ‘List the tasks in the project'

RelatedTask and RelatedActivity for 'List the tasks in the project'