Equation, Text Formula or Both?

How do I get a number like this: 03305 ?

i.e. a 5-didgit number is always returned.

In another system I would use a calculation like this:

PADL(Project+PADL(alltrim(str(Count)),2,“0”),5,“0”)

So using the above example, Project = 33 and Count = 5
The 5 is padded with a single 0 to the left and the entire number is padded with a 0 to the left

The same calc using:
Project = 125
Count = 17
Would simply result in 12517

Or
Project = 9
Count = 4
Results = 00904

eh?

Hello Peter,

if those two field are numberic then try below formula
right(00right({ProjectId},3),3)right(0right({Count},2),2)

if project id and count are text field then try below
right(00{ProjectId},3)right(0{Count},2)

Regards,
Sunny Singla
ssingla1985@gmail.com

1 Like

Thanks Sunny. That’s it. I didn’t know how to construct the padding. Great!

1 Like