ResourcesStatus Method
Description
The PDS returns a list of the resources accessible to the user, including basic status information about each resource. The resources are in the Enterprise Resource Pool of Microsoft Office Project Server 2003.
ResourcesStatus supports soft bookings and both Enterprise Resource Outline Code (EROC) values and Enterprise Resource Multi-Value (ERMV) codes.
Syntax
<Request>
<ResourcesStatus>
<Resource>
<ResourceUID></ResourceUID>
<ResourceName></ResourceName>
</Resource>
<ReturnPhonetic></ReturnPhonetic>
<ProjectID></ProjectID>
<ProjectName></ProjectName>
<IncludeBookingType></IncludeBookingType>
<MaxNumber></MaxNumber>
<ManagerUID></ManagerUID>
<ResourceType></ResourceType>
<RBS></RBS>
<IncludeParent></IncludeParent>
<OutlineCodeValues>
<OutlineCodeValue> <!--For standard EROC values -->
<UID></UID>
<ValueUID></ValueUID>
</OutlineCodeValue>
<OutlineCodeValue> <!-- For ERMV codes --> <UID></UID> <Values> <ValueUID></ValueUID> <ValueUID></ValueUID> </Values>
</OutlineCodeValue>
</OutlineCodeValues>
</ResourcesStatus>
</Request>
Parameters
ResourceUID
Optional. Returns status information for the specified resource ID. If ResourceUID is specified, ResourceName and all other parameters are ignored. Multiple ResourceUID values are valid.
ResourceName
Optional. Returns status information for the specified resource name. If ResourceName is specified, all other parameters are ignored. Multiple ResourceName values are valid.
ReturnPhonetic
Optional. Returns the phonetic resource name. ReturnPhonetic is used in the Japanese version of Microsoft Office Project 2003.
ProjectID
Optional. Returns status information for resources associated with the specified project ID. If ProjectID is specified, the ProjectName value is ignored.
ProjectName
Optional. Returns status information for resources associated with the specified project name. ProjectName is the project name as stored in the PROJ_NAME field of the MSP_PROJECTS table (the concatenation of the project identifier and the version name, separated by a period).
IncludeBookingType
Optional. A value of 1 indicates that the booking type information should be returned. Any other value (or omission of the parameter) means the booking type information should not be returned. IncludeBookingType is only meaningful if a ProjectID or ProjectName parameter is included in the request. Otherwise, the booking type for each resource in a project is not returned.
MaxNumber
Optional. If the MaxNumber parameter is specified, and the total number of resources returned would be greater than MaxNumber, count and status are the only return values. Otherwise, the return value includes a list of the currently accessible resources for the user, including some basic status information about each resource.
ManagerUID
Optional. If the ManagerUID parameter is specified, only resources that report to the specified manager are returned.
ResourceType
Optional. Filters the list based on the type of resource. Valid values for ResourceType are as follows:
Value | Description |
---|---|
0 | Active work resource |
1 | Active material resource |
2 | Active generic work resource |
3 | Active generic material resource |
4 | All active resources |
5 | Deactivated resource |
6 | All resources (active and inactive) |
If no ResourceType is specified, the PDS defaults to all active resources (ResourceType value 4).
RBS
Optional. Filters the list based on the RBS level of the resource. If specified, the PDS returns resources below the specified RBS level. If RBS is specified, IncludeParent can also be specified.
IncludeParent
Optional. If IncludeParent is specified without RBS, the PDS returns an error. IncludeParent defaults to 0, and has valid values of 0 or 1. If IncludeParent is 1, the returned set of resources includes all resources at or below the specified RBS level.
OutlineCodeValues
Optional. Contains an XML structure of one or more data pairs corresponding to the Enterprise Resource Outline Code field and the outline code value. If more than one data pair is included, the filter combines the values.
Return Value
The return value always includes a count of the total number of resources returned and basic status information about each resource, including the following:
Data | Description |
---|---|
ResourceUID | Unique resource UID of each resource. |
ResourceName | Friendly name of resource accessible by authenticated user. |
BookingType | Included only if the request specifies ProjectID or ProjectName, and has IncludeBookingType set to 1. The return value is 0 for hard (committed) booking, or 1 for soft (proposed) booking. |
IsWork | Returns 1 if a work resource, or 0 if not. |
IsActive | Returns 1 if an active resource, or 0 if not. |
IsGeneric | Returns 1 if a generic resource, or 0 if not. |
ResourceCheckedOut | Returns 1 if checked out, or 0 if not. Indicates whether the resource is checked out by another user. If checked out, the resource can only be opened read-only. |
ResourceCheckedOutUser | If the resource is checked out, the name of user who has checked it out. |
LastModified | Time and date that the resource was last modified (format YYYYMMDDHHMMSS). |
ResourceUserWrite | Indicates whether the current user has permission to check out the resource. |
ResourceUID | Unique resource UID of each resource. |
<Reply>
<HRESULT></HRESULT>
<STATUS></STATUS>
<UserName></UserName>
<ResourcesStatus>
<Count></Count>
<ResourceStatus>
<ResourceUID></ResourceUID>
<ResourceName></ResourceName>
<BookingType></BookingType>
<IsWork></IsWork>
<IsActive></IsActive>
<IsGeneric></IsGeneric>
<ResourceCheckedOut></ResourceCheckedOut>
<ResourceCheckedOutUser></ResourceCheckedOutUser>
<LastModified></LastModified>
<ResourceUserWrite></ResourceUserWrite>
<Phonetic></Phonetic>
<ReplyStatus></ReplyStatus>
</ResourceStatus>
</ResourcesStatus>
</Reply>
Remarks
Request and reply elements that are new or changed since Microsoft Project 2002 are shown in bold.
All parameters are optional and provide filtering on the returned list of resources.
If eitherResourceUID or ResourceName is specified, the PDS checks only for the existence of each requested resource in the resource pool.
The PDS checks Project Server security for the currently logged-on user, and determines which resources that user has access to and at what level (for example, read-only or read/write). The PDS gathers from the database a list of the active resources and current status of the resources that are accessible for the current user.