I'm sure theres a simple answer, but this is driving me mad. Do any of you know how to stop zeros from being omitted that prefix a code variable when using Evaluate to convert to an Integer?
As i and Danial said, decimal and integer doesn't use leading zeros.
With how many i mean, how should the serverengine know, how many zerors it must set before the number.
So if you need for example:
00001
00230
00232
02346
23456
67400
use a code field. If you need the datatype integer for calculating and the leading zeros only for displaying u can use a textbox with sourceexpresion = MyIntAsCodeVariable and set the MyIntAsCodeVariable =
MyIntAsCodeVariable := '0000' + format(IntegerField); //or better an algorithm if you need a defined lenght (for example lenght must be 8 -> 00000001, 00345678)
Comments
U can only use a textfield to display it on a form or in a report.
Potentially the code could have a maximum of 2 leading zeros..
I'll just have to work around it if it's not possible.
Thanks though.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
MVP - Business Apps
With how many i mean, how should the serverengine know, how many zerors it must set before the number.
So if you need for example:
00001
00230
00232
02346
23456
67400
use a code field. If you need the datatype integer for calculating and the leading zeros only for displaying u can use a textbox with sourceexpresion = MyIntAsCodeVariable and set the MyIntAsCodeVariable =
Regards