Formatting a field to five decimals in a page

poppins
Member Posts: 647
Hi everyone,
I have a request from a customer to make the field Quantity display 5 decimals in page 99000846: Consumption Journal.
This page is based on table 83: Item Journal Line.
In the table, the field Quantity has the property DecimalPlaces = 0:5
How can I force it to display always 5 decimals in my page?
I tried changing the property DecimalPlaces to 5:5 in the page but it didn't work...
Thanks in advance
I have a request from a customer to make the field Quantity display 5 decimals in page 99000846: Consumption Journal.
This page is based on table 83: Item Journal Line.
In the table, the field Quantity has the property DecimalPlaces = 0:5
How can I force it to display always 5 decimals in my page?
I tried changing the property DecimalPlaces to 5:5 in the page but it didn't work...
Thanks in advance

0
Comments
-
For that you need Text Field There You Can use,
FORMAT(5.55,0 ,'<Precision,5:5><Standard Format,0>')
->it Return 5.55000.
on Page it only show 5 Decimal(Type-Decimal), If There Is Actual 5 Decimal Value.
-->Note - Table Decimal property Allow to user For enter 5 Decimal Value Not For Showing (5 Zero)
0 -
BlackTiger wrote: »NavSolution wrote: »For that you need Text Field There You Can use,
FORMAT(5.55,0 ,'<Precision,5:5><Standard Format,0>')
->it Return 5.55000.
on Page it only show 5 Decimal(Type-Decimal), If There Is Actual 5 Decimal Value.
-->Note - Table Decimal property Allow to user For enter 5 Decimal Value Not For Showing (5 Zero)
Actually format should be '<Sign,1><Integer Thousand><Decimals,6>'
Both Work ,Check Format Syntax with Standard Format.0 -
Using FORMAT has the disadvantage of adjusting the result left instead of right.
Using ...<Decimals,6> has the disadvantage of showing ****** in some obscure cases when the actual value requires more than the specified number of decimals (5 in this case) e.g. 1.999999 is displayed as 1******
I suggest using DecimalPlaces=5:5 and adding 0 to the value in the SourceExpression property. This, as do the other suggestions brought forth so far, causes the field to be non-editable.
For an editable field you needed to use a variable as the SourceExpression and sync it with the field (OnAfterGetRecord, OnValidate), or define your own AutoFormatType. As an alternative to this define a foreign currency with the desired rounding and use it with one of the existing AutoFormatTypes 1 or 2.
Also, please, complain to Microsoft about this 'feature'.
@BlackTiger
What's wrong about '<Precision,5:5><Standard Format,0>'?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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