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

I am developing a discussion board in sharepoint but in that I require to have a custom ID field for each sharepoint list item and item ID should be like appended with current year "2012-1","2012-2" etc...

let me add that ... if the year changes then I would need to start the IDs from 1 for that year like if 2013 comes then the IDs will be like 2013-1,2013-2 etc.

Please share your suggestions

Thanks Rhm

share|improve this question
add comment

3 Answers

Someone asked this elsewhere and the answer was to create simple workflow. Probably event receiver would work too, if you're more familiar with them.

share|improve this answer
add comment

ItemEventReceiver is the way to go I think. Hereby the link to an example on how to do it: http://dlairman.wordpress.com/2012/02/28/autonumbering-event-handler/

share|improve this answer
add comment

The ID cannot be changed. You can however create a calculated column that uses the ID in it's value.

share|improve this answer
    
ok, please tell me how to get current Year and concatenate to custom ID column –  RHM Mar 26 '12 at 8:07
5  
You cannot use ID in calculated column. You can try this and see what happens: =YEAR(Created)&"-"&ID Hint: ID isn't populated when you create the item, only after you add it, or if you modify the calculated column. –  Jussi Palo Mar 26 '12 at 8:11
    
Whoa, didn't even know that! (after 6 yrs of working with sharepoint, it still has secrets :-D). So that would mean you'd need to create something like an ItemEventReceiver to get my proposed behavior.... –  Colin Mar 26 '12 at 18:14
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.