DECIMALPLACESMAX How To?

Belias
Member Posts: 2,998
How use this function on a field?
I want to set decimal places on the fly but i can't manage to use this function...
I want to set decimal places on the fly but i can't manage to use this function...
0
Answers
-
oh...this is the help:DECIMALPLACESMAX (Control)
Use this function to return the current setting of the maximum number of decimal places for a control (field or text box), and to set a new value. The function manipulates the maximum number-part of the setting of the DecimalPlaces property.
[CurrMaxDecimals] := DECIMALPLACESMAX([NewMaxDecimals])
CurrMaxDecimals
Data type: integer
The current setting of the maximum number of decimal places.
NewMaxDecimals
Data type: integer
The new setting of the maximum number of decimal places.
Comments
See the description of the DecimalPlaces property for details.
I can imagine i can use the function with "currform.control.decimalplaces"...but in the help they wrote FIELD, too.
maybe they intend only "control" fields and not the phisical field on the table?0 -
you can only ste the Min / Max down, not up.
For example: Default is 0:9 you can only set CurrForm."PurchasePrice".DECIMALPLACESMAX(8). If you set CurrForm."PurchasePrice".DECIMALPLACESMAX(10) the system will scream ....Do you make it right, it works too!0 -
garak wrote:you can only ste the Min / Max down, not up.
For example: Default is 0:9 you can only set CurrForm."PurchasePrice".DECIMALPLACESMAX(8). If you set CurrForm."PurchasePrice".DECIMALPLACESMAX(10) the system will scream ....
logical...but what i really meant was: can't i use the function under the table?i think not...(effectively it should be a really painful thing to decrease the decplaces of a field...)0 -
Yes, it's only for controls.
I never notice that it can only be decreased. That's very annoying if you have only a few records where you want the user to be able or force the user to enter more decimal places."Money is likewise the greatest chance and the greatest scourge of mankind."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