Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In SharePoint foundation 2010 can i add a new calculated value column where the calculation are based on when another column is modified ?

share|improve this question
1  
Individual column modification dates are not stored (Just whole list items). They can be derived from versioning or through the use of Event Receivers but this is not possible through a simple calculated column. Perhaps if you share what you are trying to accomplish we can help you find a suitable solution. –  theChrisKent Mar 16 '12 at 17:00
    
basically i want to calculate the duration for a chain of tasks to be completed, and if it meets the estimation provided but to detect the exception i want to add to the calculation when that column was modified –  Iyad Mar 16 '12 at 17:07
add comment

3 Answers

Yes, you can see this link for possible formulas - http://msdn.microsoft.com/en-us/library/bb862071.aspx

share|improve this answer
    
thanks but this not what i need, i need column C to calculate value from column a and add for example the date column b was modified in –  Iyad Mar 16 '12 at 16:55
    
Please write a case you want to have. You can for example have something like - '[Column1] * 6 + MONTH([Column2])' where column1 is number and column2 is date. Also you can combine values into a string. –  Yuri Leontyev Mar 16 '12 at 17:48
add comment

Out of the box, SharePoint won't tell you when a specific column was modified. You only know when the item was last modified (Modified field).

To track changes on a specific column, you would need to duplicate it and run a workflow that checks for updates. Not a simple design.

Here is how it would work:

  • add two more columns hidden from the users: CopyColumn and CopyModified
  • on item change, the workflow compares Column with CopyColumn
  • if the values are different it means that the user has modified the column. Calculate the time difference between Modified and CopyModified, then update CopyModified and CopyColumn for the next round
  • if the values are the same, no action, just stop the workflow
share|improve this answer
    
ok thats a new idea , how it can be done ? –  Iyad Mar 22 '12 at 20:51
    
I have added more details to the answer. –  Christophe Mar 22 '12 at 22:21
add comment

Agree with Christophe. SharePoint has no column level changetracking (just like there's no column level security). A list item is the deepest object in SharePoint you can bind events etc. to. My current client wanted to be able to see (and track, for auditing) purposes these column changes as well. We implemented an ItemEvenReceiver that writes all fields for which the AfterProperties value of a column didn't match the BeforeProperties value of said column to a database.

Another option would be to have a list identical to the source list and copy the item to that list on every update (or just the date and the old and new value of the column in question).

And another option would be to add a column ColumnBModified to your list and setting that column to the current time when the BeforeProperties value of a column does not match the AfterProperties value.

All options require code (ItemEventReceiver)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.