Document management with SharePoint - Part 2
Written By: Knox Cameron -- 7/13/2011 --
(75) comments --
Categories: Document Management, Project Management, SharePoint 2010, SharePoint Designer 2010, SharePoint Foundation 2010
< Prev -
- Next >
| Become a paid author
Flagging items by date
Another thing it can be useful to do is to filter or highlight items in a
view where (say) a review date has passed. There are a number of possibilities
in SharePoint, like using workflows to send e-mails, but let's just look at what
we can do fairly easily with a view.
The first possibility is to use filtering to create a view of overdue
documents. For example, let's say that we want to know which documents are in
the status "under review" but haven't been modified for more than 30 days,
implying someone needs to follow them up. You can set up a view with filters
However, you may also want to show all items including the due date in a
view, or color code items based on a due date. The best way to achieve this is
to create a calculated column which works out the due date, then filter and
format using the calculated column.
First, we need to create another column which will
be the modified date plus 30 days. In the document library in SharePoint, select the create column button on the
library tab of the ribbon. Enter as the column name 'Review by' and select the
type Calculated. Enter a meaningful description.
For the formula, type the following (to save typing, you can double click the
column names in the list on the right at the appropriate point to add them into
=if([Review status]="Under review",[Modified]+30,"")
If the status of the document is "Under review", this formula returns the
date the item was modified plus 30 days. Otherwise, it returns an empty string.
Select the data type Date and Time, and the format Date Only. Leave Add to
default view selected.
Select OK. You should now see the new column on the right of the view, with
dates for items that are under review.
As a last step, let's color-code red documents that have gone beyond their
review by date. Once again, select the library tab in the ribbon, and select the
option to modify the view in SharePoint Designer.
Click somewhere in one of the rows of data in the view, and select Format Row
from the Conditional Formatting button in the Options tab of the ribbon.
We want to flag items where there is a review by date, and it is in the past.
So, select the Review by column and the comparison Not Null. Then on the next
row, select the Review by column again and the comparison Less Than to select
rows where the review by date has passed (the value [Current Date] is filled in
automatically when you select a Date field).
Select Set Style. Again select a background color. I selected a shade of pink
rather than bright red, as people find that ugly and hard to look at.
Save changes, close SharePoint Designer and return to the view in the
browser. Refresh if necessary to see the final result. The document which has
passed its review by date is highlighted.
< Prev -
- Next >