markonly and calcsum
Oneway
Member Posts: 53
Hi all
could ur guys tell me how to use function CALCSUM? It seems does not work after the markonly.
eg i setted some filters of the Cust. Ledger Entry, and then MARK all what i want. I tried use CALCSUM to calc the amount field. i faild.
could ur guys tell me how to use function CALCSUM? It seems does not work after the markonly.
eg i setted some filters of the Cust. Ledger Entry, and then MARK all what i want. I tried use CALCSUM to calc the amount field. i faild.
0
Comments
-
With the MARK + MARKEDONLY, the calcsums does not work.
To use a SIFT-field, you make a record-var on the table of the SIFT-field (lets take Quantity in Item Ledger Entry) to make a sum of the different records.
Then you have to put the filters on the record-variable to indicate which records you want to use for the sum.
e.g.recItemLedgerEntry.RESET; recItemLedgerEntry.SETCURRENTKEY("Item No."); recItemLedgerEntry.SETRANGE("Item No.",'1000'); //take only records of item 1000. recItemLedgerEntry.CALCSUMS(Quantity); // total Quantity of records of item 1000. MESSAGE('The inventory=%1',recItemLedgerEntry.Quantity);
Remark1: remember the recSomeTable.CALCSUMS("some field") will OVERWRITE the current value in "some field" of table "recSomeTable".
Remark2:In table "Item Ledger Entry",in some index starting with "Item No." you need to define Quantity as SumIndexField.
Remark3: the value of my example can also be obtained with field "Inventory" of table 27:"Item".Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions