We helped a custom recently with an interesting SharePoint question – how to identify if a List item is new or has been modified? In addition they also needed to be able to setup a View to show only New items and another to show Modified items.
Every SharePoint list has the following built in columns -
- Created : Date & Time when record was created.
- Modified : Date & Time when record last modified.
These fields are normally hidden but can be shown by using “Modify this View”
(There are also Created By and Modified By fields that store the user that created/last modified a record).
- When a record is first added to a list the Created and Modified fields are the same.
- If it’s later modified only the Modified column is updated.
What we can do is create a Calculated Column to show “New” if the Created and Modified columns are the same and “Edited” otherwise.
The formula to use is be
(Of course you can use your own labels for New and Edited here).
We now see the following in the List
You can take this further and create List Views that would show only New or Edited items – for example to show only records that have been edited you would use the following View Filter in combination with this calculated column.
What was this used for?
In this particular case the customer was using a view showing only Modified records along with our Reminder product to send custom email alerts when a record was updated (but not when it was first created).