Hi ,
Can anyone know how to solve this problem.
I want the min. serial no. value in table.
so using following code but getting 10 as return value.
Actual serial no. value in table is 20.
Vehicle is a record variable of subtype Vechicle Table.
Vehicle.SETRANGE(Vehicle."Serial No.",10,300);
MESSAGE('%1',Vehicle.GETRANGEMIN("Serial No."));
Thanks in adv.
Sandip.
0
Comments
To get the min value, you need to create a loop to check it. MESSAGE('%1',MinSerialNo);
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Dear friend it will always give 10.
Better take on key which is sorting on Serial NO.
Do Setcurrent key
then setrange
and then find(-);
u will get the result
Soln given by kriki will also work
Aniruddha
The extra-key solution of aniruddha_majumdar is faster for reading, because with 1 read it has the correct record, but it will be slower to write in the table.
So if the code to read it has NOT to be lightening-fast for some reasons, it is best to use my solution.
If your code has to be lightening-fast (e.g. it is part of a posting-procedure), then it is best to use the extra-key-solution.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!