Change CalcFormula from Inventory in Item table

tompynation
Member Posts: 398
Hi,
is it possible to change the CalFormula of the Inventory field in the Item table to a more complex calculation...
So standard it looks like this:
Sum("Item Ledger Entry".Quantity WHERE (Item No.=FIELD(No.),Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),Location Code=FIELD(Location Filter),Drop Shipment=FIELD(Drop Shipment Filter),Variant Code=FIELD(Variant Filter),Lot No.=FIELD(Lot No. Filter),Serial No.=FIELD(Serial No. Filter)))
This is good but this calculated value should me reduced by a sum of quantities in one of my custom tables...
How should i do this so that the reports who uses this inventory field will still work? With still work i mean that they should also use my new extended CalcFormula
is it possible to change the CalFormula of the Inventory field in the Item table to a more complex calculation...
So standard it looks like this:
Sum("Item Ledger Entry".Quantity WHERE (Item No.=FIELD(No.),Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),Location Code=FIELD(Location Filter),Drop Shipment=FIELD(Drop Shipment Filter),Variant Code=FIELD(Variant Filter),Lot No.=FIELD(Lot No. Filter),Serial No.=FIELD(Serial No. Filter)))
This is good but this calculated value should me reduced by a sum of quantities in one of my custom tables...
How should i do this so that the reports who uses this inventory field will still work? With still work i mean that they should also use my new extended CalcFormula
0
Comments
-
Please, do not try to change this field definition. The consequences can be huge...
Question is, if the table, you need to use for the calculation, is really needed and if the way you are solving the problem is good. But without the purpose, you want to reach, hard to say.
Better and cleaner will be to subtract the value in the report directly, but I do not know, if this is needed only on the reports, or it must have some inpact to rest of the processes.0 -
You should create one or more new flow fields in item table: one for each quantity you want to calculate in you custom table(s).
In your report these new fields must be calculated along with Intentory field. After that just subtract fields' values from each other to get desired figure.0 -
yes, but that means that i should addapt every report that uses the inventory field...
Why would it be bet to just change that CalcFormule?0 -
tompynation wrote:yes, but that means that i should addapt every report that uses the inventory field...
Why would it be bet to just change that CalcFormule?
Only one field from one table can be calculated in a flowfield. As I understand you want to subtract values from another table(s).0 -
tompynation wrote:yes, but that means that i should addapt every report that uses the inventory field...
Why would it be bet to just change that CalcFormule?
Because it is done in this way. If you do not want to see some quantity on inventory, it means, that it is not there and the problem is in your data. If the quantity is not there, move it where it is, sale it, if it was sold, transfer it, if it was transfered... if it is "loaned", trransfer it to special location "loans". etc...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