Converting Code that starts with multiple zeros to Integer
JamieBrown
Member Posts: 107
Hi,
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?
Thanks in advance.
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?
Thanks in advance.
0
Comments
-
datetype integer / decimal doesn't use to leading zeros (question how many?).
U can only use a textfield to display it on a form or in a report.Do you make it right, it works too!0 -
Hi garak,
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.0 -
-
What are you talking about? Integers don't have leading zeroes.JamieBrown wrote: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?0 -
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)
RegardsDo you make it right, it works too!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

