Neat tip from the SharePoint UK User Group (and thank you Dave Hunter) – if you want an automatic, incrementing column on a list…
Create a new calculated column, with =TEXT(ID,”000000″) as the formula and return data type a single line of text. It will give you 000001.
Neat. I didn’t know that ID was a valid command in a calculated column.
All SharePoint lists already have an auto-incrementing column… “ID”. You can show it on your list by simply editing the default list view and selecting the ID column.
In your example above, you are just creating a calculated column to show the value of the ID column, ID is not a function.
Ah, d’oh, of course. Yeah, that’s pretty obvious, so naturally I didn’t see it.
Actually, though, the thing that would put some of our customers off is the format of the number – so using the TEXT function is probably the bit I need to remember. I wonder if I could make it do letters too…
I have used the ID in the past. Have not been able to get the calculated function to work. Keeps coming back as 0000000.
I think when SP is saving the item the ID is blank(or 0) so the caclulation uses that value. The ID is calculate afterward, at least in my experience.
Hmm. That’s probably true on creation, actually. It can’t have an idea of what it’s ID is until it’s created.