Is there a way to create an autonumber column in the lists and libraries?
For example I want to have a list and when a user wants to add a new value, it automatically generates a new autonumber.
2 Answers
When you create any list or Library a column named ID is created automatically and it is Auto-number Column; And if you want to create your own autonumber column you can create it with Calculated Type of Column.
-
The link you specified to customise the autonumber is actually a question stating it doesn't work as expected using the calculated column.– RussellCommented Oct 17, 2012 at 5:26
-
2hey Sorry i got wrong link.. try this link.. this shows how to create Autonumber Column in List.. sharepointinnovations.blogspot.in/2011/03/… Commented Oct 17, 2012 at 5:29
-
That looks...erm... pretty useless. Its just ID+1. Whats the advantage of that over just the existing ID column?– RyanCommented Oct 17, 2012 at 8:10
-
1Unfortunately using
[ID]
in a calculated column doesn't work: sharepoint.stackexchange.com/a/46258/1529– Stu PeggCommented Oct 17, 2012 at 8:17
If you want to show this number on AllItems.aspx page, you can use xslt. In spd add a column at the beginning of the table for examaple and add there this formula: position()
It will show so-called 'id' of each item of the list