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

Please provide a solution to this. How do you display the ID or auto incrementing 6 digit number in list NewForm.aspx

share|improve this question

1 Answer 1

As far as I understand it, the ID is allocated by SharePoint when the item is saved to the list. So in the NewForm.aspx it is not yet available to display.

share|improve this answer
    
Thanks on you inputs could you let me how can you generate a field that gets autoincremented and make it to display in the newform.aspx –  raghu Mar 27 '13 at 10:00
    
Can you perhaps explain more about why you need to see it in the NewForm? –  Dave Paylor Mar 27 '13 at 10:03
    
It s like i need a field in newform which should get populated with 6 digit unique number when 'add new item' is clicked. How do you do that? –  raghu Mar 27 '13 at 10:13
    
You could possibly maintain a separate list with your unique numbers in and use some jQuery to grab the latest, write a new row back with an incremented value etc but there is a lot of risk here depending on the concurrency of your list as if two users try to create new items at the same time then they will potentially get the same ID. My suggestion would be to see if you can rework your solution to use the standard ID which is known to be unique. –  Dave Paylor Mar 27 '13 at 11:55
    
yes, please advise me some around to display that ID in newform. some suggested me get the previous ID and display by adding 1. but if you would improvise on that it would be more helpful to me. –  raghu Mar 28 '13 at 7:32

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.