Tuesday, May 24, 2005

Managing Approvals With List Views

Unlike SPS 2001, SPS2003 contains no basic workflow functionality. Users are able only to submit items for approval/rejection on a per-list basis; content approvers must subscribe to alerts for each library in order to be notified of submissions that require action, or browse to each list to check the status. This is definitely an area where Microsoft has fallen short in migrating functionality from v1 to v2.

Several web parts exist that provide an "inbox" for displaying all items by approval status but I haven't had much luck with them - they tend to fall into the following categories: a) open-source projects that were never finalized and contain many bugs, b) free utilities that haven't been tested in all deployment scenarios (i.e. server farms), or c) add-ons available only within expensive workflow management products. Not an encouraging landscape.

Fortunately, there is a way to use List Views to achieve a rudimentary form of centralized approval management. Although it doesn't filter by current user or provide an alerting function, it will give content approvers a centralized view of pending items.

Begin by enabling approvals for each list (announcements, events, document library, etc.):

1. Click on 'Modify Settings and Columns'
2. Click on 'Change General Settings'
3. Select 'Yes' in the Content Approval section.
4. Click 'Ok'.

This will add two new views to the list: "Approve/Reject Items" and "My submissions". The "Approve/Reject Items" view displays all Pending, Rejected, and Approved items. To modify this view to show only Pending items, do the following:

1. Click on 'Modify settings and columns'.
2. In the Views section, click on 'Approve/reject items'.
3. In the Filter section, click the radio button titled "Show items only when the following is true:".
4. Select "Approval Status" from the drop-down.
5. Enter "Pending" in the text field below the operand selector.
6. Click 'Ok'.

Repeat this process for each list that requires approvals. Alternatively, if you want to preserve the standard 'Approve/Reject' view, create a new view using the standard view as a template and modify it as necessary.

We now need a web part page or list to hold the view web parts for each approval list. Using a web part page is easier in the long run, as view web parts can easily be added to the page as additional lists are created using the 'Modify Shared Page' function; however, a static link will have to be created for the page (or users will have to navigate to the library it's stored in). Using a custom list solves the navigation issue but view web parts can only be added in Frontpage (if anyone knows how to add the 'Modify Shared Page' drop-down to a list, please share the secret).

For this example we'll use a web part page:

1. Create a new Web Part Page from the Create menu.
2. Modify the page and Drag each list web part into a web part zone.
3. Set the Selected View to 'Approve/reject items'

Once all web parts have been modified, the resulting page will dispaly the pending items for each list. As new approval lists are added to the site, the process can be repeated to maintain a centralized view.

NOTE: If you want to try your hand at directly editing code in Frontpage, you can remove the header, navigation, etc. from the web part page, then call that page from a Page Viewer Web Part. This would give you the ability to easily add parts to the source page and an automatic link to the views in the Lists section of the left-hand navigation.