-1

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

1 Answer 1

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.

7
  • 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, 2013 at 10:00
  • Can you perhaps explain more about why you need to see it in the NewForm? Mar 27, 2013 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, 2013 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. Mar 27, 2013 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, 2013 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.