total lines Select in form

lilianatavares
Member Posts: 39
Hello,
I would like to know how can I add the selected lines in a form and see the total in that form. What's the trigger in form that I can use?
Thank you.
I would like to know how can I add the selected lines in a form and see the total in that form. What's the trigger in form that I can use?
Thank you.
0
Comments
-
i'm from porto too :P
you just need to have a key that has the field you want to calc the sum as a SumIndexField. look at the help, its quite clear:
CALCSUMS (Record)
Use this function to calculate the total of a column of SumIndexFields in a C/SIDE table. Using parameters, you can tell the system exactly which fields to calculate.
[Ok :=] Record.CALCSUMS (Field1, [Field2],...)
Ok
Data type: boolean
If you omit this optional return value and if one of the fields is not a SumIndexField, a run-time error occurs. If you include a return value, the system assumes you will handle any errors.
Record
Data type: record
The record that contains the SumIndexFields you want to calculate.
Field1, Field2, ...
Data type: decimal
One or more decimal fields, which are defined as SumIndexFields, in the current key.
Comments
Use this function to total columns in a table. This function operates only on records that meet the conditions of any filters associated with the record.
Example
This example shows how to use the CALCSUMS function.
"Cust. Ledger Entry".SETCURRENTKEY("Customer No.","Date");
"Cust. Ledger Entry".SETRANGE("Customer No.", 'AAA 1050');
"Cust. Ledger Entry".SETRANGE("Date", 010196D, 123196D);
"Cust. Ledger Entry".CALCSUMS("Amount");
The first line selects a key. The second and third lines set filters for the fields Customer No. and Date in the Cust. Ledger Entry record so the total is only calculated within the specified range. The CALCSUMS function then finds the net change in account AAA 1050 for 1996. The Amount field will show the result of the calculation.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