This has been asked before, but years ago, here. The links are dead. I searched the documentation for auto-incrementing, and have come up with nothing useful.
I’m adding an additional attribute to a pre-existing entity, and I want to populate the attribute with numerical values that will auto-increment. Essentially a tracking number.
Just a bit of advice regarding the direction I should go would be helpful. I plan to do a SQL update for the current entries. I need to find a way to get the code to pick up where the numbers left off, up to an infinite amount of entries.
This is exactly the type of solution I was hoping for.
While I had some strange issues attempting to update the UniqueNumbersAPI currentNumber value (I set a conditional loop to evaluate if the current number was less than my manually updated value and increment the value if true (it looped to eternity)), I was able to get it working by manually setting the sequence number once. Then I inserted a new value and got rid of my statement setting the current number. I couldn’t figure out why that wasn’t working, but I’m happy that it is now functioning correctly.