Hi
I need to export some fields in fixed length and I need to add zeros in beginning of the data.
This codeline works fine, result is 00004551, witch is correct
FORMAT("Sales Invoice Header"."Order No.",0,'<TEXT,8><Filler Character,0>');
But every field that contain amounts don't work, result 655000000, should be 000006500
f23 := FORMAT("Sales Invoice Line"."Unit Price",0,'<Precision,2:2><Standard Format,0>');
f23 := DELCHR(f23,'=',',');
f23 := DELCHR(f23,'=','.');
f23 := FORMAT(f23,0,'<TEXT,9><Filler Character,0>');
Is there anyone who could help a little bit, I tryed with PADSTR but same result.
Regards
Lars
0
Answers
Assuming you want the number in pennies format (eg $376.92 - 000037692) then I would just multiply by 100, round to an integer, then assign the value as an integer in the function that you have that already works. I guess what is happening now is that the FORMAT is left justifying.
KISS.....
If you need the decimal point use
or
i.e. the "filler character" attribute relates to the preceeding attribute.
hope this makes sence
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
To be honest I don't really like looping to fill up a string like that
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!