Create functionality to pull next sequential number on demand
I'm trying to come up with a solution to provide the next sequential number on demand and would welcome ideas on how to accomplish this. At a high level, what I'd like to do is have a button in a form reading "Get Next Number" and have the next sequential number entered into a field after the button is clicked.
I've done some research and have gotten the sequential number to appear in the form field, but it either increments every time the form (in this case for Configuration Items) is opened, or it does nothing.
So, to repeat - how can I use the sequential number functionality, but only on user demand, rather than it automatically populating?