URL Options: View Variables

View variables are URL options that specify the view of a page that you have customized with the View Options, Filter, Group, Search, and Zoom In / Zoom Out settings. You can use view variables in conjunction with the parameters described in URL Options: Modifying the Query String Parameters.

View variables affect only the View my tasks page (TasksPage.asp), the Project Center page (PortfolioView.asp), and the assignments pages such as View resource assignments (WebclientView.asp). Some of the view variables do not affect certain views of the related pages. In general, the page responds to any of the view variables that Project Server can use to display data in a specific Active Server Pages (ASP) page.

To use view variables:

  1. Alter a page view to get it just the way you want it. For example, click the Projects menu in Microsoft® Office Project Web Access, and then click Filter, Group, Search. Click the Group by drop-down list, select a grouping, and make any other changes you want.

  2. Click Save Link when you are satisfied with the way the view looks.

  3. Assign a name to the view in Save Link -- Web Page Dialog dialog box, and then click OK.

  4. Expand the Saved Links section in the left pane, click your saved link shortcut, and examine the URL in the browser's Address box. The URL includes many view variables that specify the view you customized. For example, the following URL would be all on one line; you would see different view variables, depending on the way you organized your view.

    http://ServerName/sample/Views/portfolioview.asp?ZoomLevel=0&
        GroupBy0=8&GroupBy1=3&GroupBy2=0&
        StartDate=476389156&SortBy=ASSN_START_DATE&
        SortDir=0&OutlineLevel=-1&TLTasks=true&
        _viewID=1&_cfF1=PROJ_VERSION&
        _cfOp1=%3D&_cfV1=Published&
        _cfJ1=and&_cfF2=&_cfOp2=&_cfV
    

You can add other URL options, such as SimpleUI, and save the link again with the same or a different name. In addition to saving your favorite views in Project Web Access, you can also use the saved URL when you customize Web Part Pages.

Descriptions of View Variables

Following is a description of the major view variables that you might want to set manually. The easiest way to create view variables is to adjust the view in Project Web Access, and then save the link.

If a view variable has an invalid value, the view results in the default view or defaults to the last persisted value of the view variable.

  • Delegation: Sets the Delegation tab as the default tab for the timesheet. The valid value is 1. Any other value yields the default or last persisted view.

  • DelegTasks: Represents the value of the delegation filter on the Delegation tab for a timesheet. Valid values are described in the following table.

    Value Description
    0 All delegated tasks that you track
    1 All delegated tasks for which you are the lead
    2 All delegated tasks that you track, but for which you are not the lead
  • FilterBy: Represents the value of the Filter By drop-down list box (if it is present on the page). Valid values are 0 through the total number of options in the list box, which varies with the page. Invalid values yield the default or last persisted value. The following table shows the values for a timesheet page.

    Value Description
    0 All tasks
    1 All tasks created by resource
    2 All completed tasks
    3 All incomplete tasks
    4 All tasks deleted in Microsoft Office Project Server
    5 All newly assigned tasks
    6 All overdue tasks
    7 All tasks changed by a manager
  • GanttView: Specifies whether to show the Gantt chart or the usage/timesheet view on the right side of the grid. Valid values are –1 (show Gantt chart) and 0 (show Usage /Timesheet view).

  • GroupByn: Represents each level of grouping in the grid. GroupBy0 represents one grouping level; GroupBy1 is two grouping levels; and GroupBy2 is three grouping levels. You can see the total number of grouping levels available by the number of Group by drop-down list boxes available when you click View Options.

    The value is the index of the item in the list box. Valid values for each GroupByn option range from 0 through the maximum number of items in the list box that it represents. Invalid values default to none or the last persisted value.

  • NWT: Specifies whether the Show nonworking time check box is selected. Valid values are 0 (not selected) and 1 (selected).

    Note  The Show nonworking time and Summary rollup check boxes do not apply to the Timesheet view; they apply only to the Assignments view. Summary rollup also applies to the Project view.

  • Overtime: Specifies whether the Overtime check box is selected. Valid values are 0 (not selected) and 1 (selected).

  • PeriodFrom: Represents the start date of the time period for the grid control, and has the same values and defaults as StartDate. The value must be less than PeriodTo.

  • PeriodTo: Represents the end date of the time period for the grid control, and has the same values and defaults as StartDate. The value must be greater than PeriodFrom.

  • Scheduled: Specifies whether the Scheduled tasks check box is selected. Valid values are 0 (not selected) and 1 (selected).

  • SortBy: Represents the field that the grid is sorted by. Valid values vary with the page and with the view. The default value is none or the last persisted value.

  • SortDir: Represents the sort direction on the field named in the SortBy variable. Valid values are 0 (ascending) or 1 (descending); the default is 0.

  • StartDate: Represents the start date that is shown in the grid. Valid values are 0 to 1,579,890,742 and represent dates between midnight on 1 January 1984 (0) and 11:59 P.M. on 31 December 2049 (1,579,890,742). An invalid value defaults to today or the last persisted value.

    Project Server calculates this value for you when you set the Start Date in the normal way. Internally, the number is a 32-bit Long integer where the high 16 bits represent the number of days since 1 January 1984 and the low 16 bits equal the number of minutes since midnight of the day shown in the grid.

    Note  StartDate applies only to the Gantt chart view, not to the Timesheet view.

  • SummaryTasks: Specifies whether the Show summary tasks check box is selected. Valid values are 0 (not selected) and 1 (selected).

  • SummaryRollup: Specifies whether the Summary rollup check box is selected. Valid values are 0 (not selected) and 1 (selected).

    Note  The Show nonworking time and Summary rollup check boxes do not apply to the Timesheet view; they apply only to the Assignments view. Summary rollup also applies to the Project view.

  • TimeScale: Represents the time scale to show in the grid usage view. Valid values are shown in the following table.

    Value Description
    0 (default) Entire period
    1 Days
    2 Weeks
  • TLTasks: Represents the Show Task Lists check box. Valid values are 0 (not selected) and 1 (selected).

  • ZoomLevel: Represents the zoom level of the dates in the grid. The zoom level is set when you click the Zoom In and Zoom Out buttons in the grid toolbar. Valid values are –3 to 6; the default value is 0.

Note  The view variable FavID represents the current favorite link ID that is stored in the database. You should not use FavID; if it is included in a Web Part or a saved link, Project Server ignores it.