0

I have ID Column Name enabled in a list. However, I have been asked if it is possible to see the auto-generated ID as the user is creating a new list entry. In other words, if a user clicks +New Item to create a new list entry, they would like a field to display the unique ID number that is now only visible after saving the new list entry. Is that possible? Thank you.

1 Answer 1

2

Unfortunately this is not possible in a reliable way. The reason is that the list entry/item and thereby the item ID is only created when you hit the save button and SharePoint stores the data in the list.

With a customization of the "New item" form, it would be possible to show an estimation of what the next ID might be. This could be done by inserting JavaScript into the form which looks at the existing list items to find the highest existing ID and display it (+1) in the form.

The reason why the displayed ID might be incorrect in that way could be at least one of those:

  • Another user has opened the "New item" form in the meantime (which would should the same "new" ID) and saved it.
  • Even though the highest existing ID in the list might be e.g. "17", it does not guarantee that the next item will have the ID "18". Imagine that after "17", another item was already created, but then deleted. IDs of previously deleted items are not reused by new items.
1
  • Thank you, Anon. I assumed that would be the case. I appreciate the quick and detailed feedback.
    – tbenson
    Commented May 8, 2018 at 16:40

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.