Display list item ID on the view page?

May 28, 2008 at 7:03 PM
I thought I could use this tool to enable display of 'ID' of a list item on the Display and View pages. (By default, when you view a list item, the ID is part of the URL but the field is not displayed on the page). But, it didn't work. Did I do it incorrectly? Is there any other way of accomplishing this?
 I am using the 2007 version of Project Server/WSP 3.0

Sep 7, 2010 at 3:41 AM
Edited Sep 7, 2010 at 3:47 AM

There are many ways to achieve this. Some simple and some not so simple. Take your pick.

  1. If your admins are crazy enough to allow this tool to be installed, you could easily achieve this in SharePoint Designer. Either convert existing list view to DataView and modify, or create a new List Form.
  2. OR use JasvaScript and a Content Editor web part - http://blog.pathtosharepoint.com/2009/01/18/item-id-in-display-and-edit-forms/
  3. OR you could create a new column called - e.g. ItemID - and give it a default calculated value of =(TIMEVALUE(Today))/(SECOND(Today)), or something else suitable. Add this to your view but remove, not your content type!
  4. OR you could use an event receiver that updated the value of a specified column that isn't editbale by users.
  5. OR you could write a SPD workflow to achieve the same goal.
  6. OR you could create a custom field through code that did it in a way that meets exact requirements.
  7. OR if you're not a code monkey you could use someone else's code.
  8. OR just look at the URL. The item ID already forms part of it. :)