Enforce leading zeros


#1

I have a pre-existing order number in the format of “LS003456” that I would like to auto-generate. I’m using a second field with autonumber and then a formula like this:

CONCATENATE(“LS00”, AutoID)

which gives a result of:

LS00185
LS00186
LS00187

Is it possible to modify the formula so that there are always 6 digits after the “LS” and any leading zeros are maintained?

My end goal is to have a sequence like:

LS000001
LS000002
LS000003

LS999999


#2

Use this formula:

'LS'&
REPT(
    '0',
    6-LEN(
        AutoID&''
        )
    )&
AutoID