0

In an implementation I am attempting to do, we are attempting to grandfather an existing nomenclature that exists for naming entities within a system.

The current numbering system is a fixed 6 characters, however depending on the entity that's being classified anywhere from 1 to 3 characters might be alpha and the remainder is always numeric.

For example : Company 1 might be a non-profit and company 2 would be profit

  • Company 1 (Non profit) = NP1234
  • Company 2 (Profit) = P12345

Currently the way we're doing this is we have 3 "Auto ID" fields that depends on what the first three digits are (one auto ID for 3 digits, one for 4 digits, and one for 5 digits). Using IF statements we determine what category of company we're classifying and then assign an auto ID after the fact.

For instance,

  • IF Company Type = Non Profit, ID = NP +AutoID4digit
  • but if Company Type = Profit then ID = P + AutoID5digit

While this is functional, it's quite cumbersome and certainly has the potential to go over the character limitation.

Is there a more efficient way to perform this task?

3
  • What are your requirements in terms of uniqueness? Would it be valid to have both ABC123 and DEF123? Commented Oct 14, 2014 at 19:11
  • @CarolynGrabill Yes that would still be valid.
    – DKNUCKLES
    Commented Oct 14, 2014 at 20:16
  • 1
    So what max numbers of different id's do you need? For the 3-digit ones you will only have 1000 id's available. Is that acceptable? And if so, will it also be acceptable for the other 1-alpha-char id's? Commented Oct 14, 2014 at 20:27

0

You must log in to answer this question.

Browse other questions tagged .