TRANSFORM(..., "@L 99999") does pad with leading zeros not spaces.
>Probably better to PADR() or PADL() with 0's than use a format string that injects spaces. That just looks weird. :-)
>
>I think I'd use
>
>
>lcId = SYS(2015) + PADL(Application.ThreadId,5,"0")
>
>
>Actually I think you might need 6 characters - I frequently get 5 digit values in the upper 5 digit range. In theory threadID is a DWORD so that number COULD get VERY large. In reality though I've never seen a 6 digit threadID - anyone?
>
>+++ Rick ---
>
>><snip>
>>>
>>>lcId = SYS(2015)+TRANS(Application.ThreadId)
>>>
>>>
>>>Unfortunately this also changes the size of the id and because the value isn't a fixed length it's harder to optmize the id. ThreadIds can be up to 5 digits wide.
>>>
>>
>>You can easily make it a fixed length.
>>
>>
>>lcId = SYS(2015) + TRANSFORM(Application.ThreadId, "@L 99999")
>>
--sb--