MAX Value
mrigya
Member Posts: 124
Hi All
Can anybody tell me is there is any function like MAX in NAV, which can get the maximum value in the field of type decimal or integer.
Thanks and Regards
Mrigya Matoo
Can anybody tell me is there is any function like MAX in NAV, which can get the maximum value in the field of type decimal or integer.
Thanks and Regards
Mrigya Matoo
0
Answers
-
do you need a function which returns the highest value are possible in an integer field or decimal field?
like decimal = range between -999.999.999.999.999,99 - 999.999.999.999.999,99
like integer = range between -2147483647 - 2147483647
or the highest value are stored in your recs like under sql?select MAX(Field) from Table Where Condition
Do you make it right, it works too!0 -
I m not working on SQL ..i want this thing to be done in Navision.0
-
Where do you need this? Report? Forms? Table?NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
hi
there is not a specific function to return the maximum value of a field/data type, i think
check the data type you are using to know the range
if you want to know the max value in a field from a table, create a new key using your field and change your sorting using that key...
regards_______________
so far, so good0 -
for integer you can use the integer table... for decimal, there is no way.0
-
In my meaning the integer Table has only stored the data between - 1000000000 and 1000000000Do you make it right, it works too!0
-
Flowfields have a MAX method - but it will kill performance if the table is big
Couldn't you make your own function to loop thru the records
if vMaxValue < "your integer"
then vMAxValue := "Your Integer";
at the end vMaxValue should have the largest #? :-k0 -
No... Idea!!!0
-
Hi....u try this...i wish it worked...
Documentation()
Sales Line - OnPreDataItem()
MaxAmt := 0;
Sales Line - OnAfterGetRecord()
REPEAT
Amt := "Sales Line"."Line Amount";
IF Amt > MaxAmt THEN
MaxAmt := Amt
UNTIL "Sales Line".NEXT = 0;
Sales Line - OnPostDataItem()0 -
Thanks a Ton,its working Fine.
0 -
That solution looks familiar

glad it works!Savatage wrote:Couldn't you make your own function to loop thru the records
if vMaxValue < "your integer"
then vMAxValue := "Your Integer";
at the end vMaxValue should have the largest #? :-k0
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

