max functiion

Hi, is there a command in Navision like MAX in SQL. Thanks.

The simple way would be to add a key to the table and sort by field you want to rank. Then the code is: CLEAR(MyValue); MyTable.RESET; MyTable.SETCURRENTKEY(“My Field”); IF MyTable.FIND(’+’) THEN MyValue := MyTable.“My Field”; Another more drastic way would be if you could add a field to a table of type flowfield. Then in the CalcFormula property you could put Method=Max TableName=MyTable FieldName=MyFieldname. That calculates the maximum for you on the fly. Regards, edd

or if you can create a new field, create a flow field, with the Method “Max”

quote:


Originally posted by naveenjain
or if you can create a new field, create a flow field, with the Method “Max”


Thanks Edward and Naveen.