Compartir a través de


Creating Lookup Tables and Enterprise Custom Fields

Applies to: Office 2010 | Project 2010 | Project Server 2010 | SharePoint Server 2010

In this article
Creating Lookup Tables with Project Web App
Creating Custom Fields with Project Web App
Creating Lookup Tables and Custom Fields with the PSI

You can use Project Web App or a custom Project Server Interface (PSI) application to create and edit enterprise custom fields and lookup tables. Microsoft Project Professional 2010 allows you to view and select enterprise custom fields but does not allow you to edit them. If an enterprise custom field requires a lookup table, create the lookup table first. Lookup tables can be shared by multiple custom fields. Lookup tables replace value lists in versions of Microsoft Project up through Microsoft Office Project 2003.

This topic includes the following sections:

  • Creating Lookup Tables with Project Web App

  • Creating Custom Fields with Project Web App

  • Creating Lookup Tables and Custom Fields with the PSI

Creating Lookup Tables with Project Web App

In Project Web App, click Server Settings in the Quick Launch, and then click Enterprise Custom Fields and Lookup Tables in the Enterprise Data section of the Server Settings page. In the Lookup Tables for Custom Fields section of the Enterprise Custom Fields and Lookup Tables page, click New Lookup Table. Figure 1 shows the New Lookup Table page.

Figure 1. Creating a lookup table in Project Web App

Creating a lookup table in Project Web Access

You can create the following types of lookup tables. There is no Flag type for lookup tables.

  • Cost

  • Date

  • Duration

  • Number

  • Text

A lookup table of type Text can be hierarchical and includes a code mask. A hierarchical text lookup table acts as an outline code. For example, in Figure 1, the top-level values are limited to two uppercase letters. The sublevels can include any number of characters; levels are separated by a dot (.) in the code mask. Lookup tables of type Cost, Date, Duration, and Number can include a list of values but cannot be hierarchical and do not include a code mask. Lookup table values of any type can include a description. Figure 2 shows the Lookup Tables for Custom Fields section after creating the lookup table in Figure 1.

Figure 2. List of lookup tables in the Enterprise Custom Fields and Lookup Tables page

List of lookup tables

Note

You cannot delete or rename the default lookup tables, which include Department for departmental custom fields, RBS for the resource breakdown structure, and State for the state of project proposals. Department and RBS do not have any default values; a Project Server administrator can edit the lookup tables. The default State values (Proposed, Approved, and Rejected) cannot be changed.

Creating Custom Fields with Project Web App

To create a new enterprise custom field in Project Web App, click New Field on the Enterprise Custom Fields and Lookup Tables page. You can choose one of the following Project Server entities:

  • Project

  • Resource

  • Task

In the Custom Attributes section (Figure 3), you can choose whether the custom field uses a lookup table, a formula, or has no custom attribute. Some custom field types are limited in custom attributes; for example, a Flag custom field cannot have a lookup table or use a formula. If you select a lookup table, you can optionally select a default value and whether to allow hierarchical codes and multiple values. Other options include whether to display data or graphical indicators, and whether selecting a field value is required in enterprise projects.

Figure 3. Creating an enterprise custom field

Creating an enterprise custom field

After you click Save, the Enterprise Custom Fields section (Figure 4) shows the new custom field.

Figure 4. List of enterprise custom fields in Project Web App

List of enterprise custom fields

Warning

Project Web App and the PSI methods allow you to create an enterprise project custom field of type Flag, and set the custom field to be workflow controlled. However, Project Server workflows cannot control Flag custom fields. You should not set project custom fields of type Flag for workflow control.

Creating Lookup Tables and Custom Fields with the PSI

Because Project Web App uses the PSI to create lookup tables and custom fields, you can use the same methods and datasets in a custom application. For example, you can import data from a line-of-business application and create a new lookup table for a resource custom field or modify a default lookup table such as RBS. For code examples of reading and creating lookup tables, see ReadLookupTablesByUids and CreateLookupTablesMultiLang. For code examples of creating custom fields, see ReadCustomFieldsByEntity and CreateCustomFields.

For an example class that uses the LookupTable Web service to create a hierarchical text lookup table, see Walkthrough: Creating a Hierarchical Lookup Table in the MSDN Library. For a sample method that uses the CustomFields Web service, see How to: Create an Enterprise Custom Field.

For custom fields or graphical indicators that include formulas, the following methods in the CustomFields Web service in Project Server 2010 can use or return formulas in a CustomFieldDataSet that are specific to the locale (language) of the computer running Project Server.

Warning

When you use the PSI to create or update a number lookup table, do not add values that have more than two decimal places.

PSI methods in the LookupTable class enable you to save a number with more than two decimal places. When you create a custom field that uses the number lookup table, Project Professional 2010 rounds the number custom field values to two decimal places and shows them as strings in the drop-down list to select a value. When you select a value, Project Professional 2010 converts the string back to a number. The process shows an error, because the numeric value with only two decimal places does not exist.

See Also

Concepts

Local and Enterprise Custom Fields

Rollup and Roll-Down Custom Fields

Other Resources

Walkthrough: Creating a Hierarchical Lookup Table

How to: Create an Enterprise Custom Field