Welcome to Office Zealot Sign in | Join | Help

Calculating an Aging Column in SharePoint 2007

Here's an interesting problem... with a more interesting solution!

Let's say you want to create an Aging column in your document library (i.e. the number of days since the document was last changed).  Since SharePoint supports calculated fields, this should be easy.  Right?  No.  The challenge is using the 'Today' function in a calculated field.  When you try to use it, SharePoint throws an error with a reference to Today being a volatile function.  How to get around this?  Do the following...

1. Create a new column called 'Today'.  Make it a single line of text.

2. Create a new calculated field called 'Aging'.  Give it a formula of 'DATEDIF([Modified],[Today],"D")'.  Have it be a number with 0 decimals.

3. Go to the edit page of the 'Today' column and delete it.

Now look at your Aging column.  It worked!  It shows the number of days since the document was last modified.  Sneaky... but it works!

 

Published Wednesday, June 04, 2008 1:03 AM by Mauro

Comments

Thursday, June 19, 2008 3:09 PM by Blog del CIIN

# WSS 3.0 & MOSS: Recopilatorio de enlaces interesantes (XVIII)!

Tal y como os adelantaba en el último post , aquí tenéis la enésima entrega...bueno más bien la 18ª sobre

# WSS 3.0 & MOSS: Recopilatorio de enlaces interesantes (XVIII)! « Pasi??n por la tecnolog??a…

Anonymous comments are disabled