How to generate SN number

The last post on the topic that Mike referenced gives a good solution …