Creating a Web Part that Lists Projects with a Specified Custom Field Value

To list all projects that have a specified value of a custom field, the easiest solution is to develop a PSI extension that queries the Reporting database (RDB) in Project Server 2010. When you install the attached file, the ListProjectsWebPart_JSGrid\ListProjects_PSIExtension subdirectory includes complete code samples to create and test the ListProjects PSI extension. The code sample in the ListProjectsWebPart_JSGrid\ListProjects_WebPart subdirectory creates the ListProjects Web Part that calls the PSI extension and displays a list of projects in a JS Grid control.

The same ListProjects Web Part can be used in Project Web App pages, project detail pages (PDPs), and project site pages (a project site was called a project workspace in Project Server 2007).

The Web Part to List Projects with a Custom Field Value.docx article in the attached is a draft of procedures that will be included in new articles in the next update of the Project 2010 SDK.

Comments (4)
  1. Jim Corbin says:

    The column sorting functionality for the JS Grid is not implemented in the attached code sample. The next Project 2010 SDK download will include the complete code sample that implements sorting in the grid.

  2. Choggo says:

    what is the performance impact of calling readproject for each project?

    On project 2k7 I've had such loops take well over 10 minutes (not the alternative used in the end….)

  3. john.andrew says:


    Wouldn't it be more efficient to have an index on a text-type custom field (such as a hierarcy list)to work on a subset of the portfolio data? Querying two million tasks across a 1500-project portfolio, even in RDB, to identify similar values could be daunting and very time consuming. Hierarchical lookup lists are more compact.

    Although not available in PS 2010, having additional breakdown structures to organize key company data would be even better. Each structure would have integrated indexing.

    –John Andrew Kossey

  4. Jim Corbin says:

    The calls to ReadProject is done on the server in a PSI extension, and just for the projects that have the specified custom field value. That saves the overhead of making separate PSI calls from the client application, so the performance impact is minimal. It would be interesting to see a performance comparison using the same calls from the client and in the PSI extension, if someone would be able to do that. In addition, Project Server 2010 has implemented a number of performance improvements over Project Server 2007.

    John — the SPROC query in the ListProjects PSI extension is to MSP_EpmProject_UserView, and has nothing to do with tasks. Undoubtedly there are performance improvements that could be made; the SDK article shows the essential ideas. For the updated articles, see Developing PSI Extensions (…/ff843378.aspx) and Developing Project Server Web Parts (…/ff943563.aspx) — and the subsections — in the SDK.



Comments are closed.

Skip to main content