How to find the sum of the column?

0216.howtosss.JPG0216.howtosss.JPG

0216.howtosss.JPGhi everyone nav users :slight_smile: I need a little help here

how to sum the line_Price column IN Code?? (result will be in another table)

I just started to learn the interface, but given the task to perform in the code ._.

If you are new to nav…did you ask the help to person who gave you this excersise…

I do not have anyone I could ask: (

but i find the sum :slight_smile:

//

summares:=0;

home4_submain.SETRANGE(line_Price);

IF home4_submain.FIND(’-’) THEN BEGIN

REPEAT

summares += home4_submain.line_Price;

UNTIL home4_submain.NEXT=0;

END;

//

but how to sum only the “Computer stuff” with ID = 1??

I am sorry…

Please read the basic technical documents…how to use setrange and setfilter …

You should refer the matter to experts and not mess with NAV coding. You can accidentally create more problems for you that solving it.

what is the normal method when accessing your table? do you create key(s)? do you know that you can have a flowfield, so that you can use calcfield.
i agree with Mohana & Sandeep, discuss with your senior / colleagues / team mates and read first the development guide material. your company should make those material available to you.