Calculate Flowfield using other fields in the same table

jgutzm
Member Posts: 4
Hello,
I have a developing question. I want to create three fields in the
Item table:
- Astore: Flowfield that calculates how many items are in the A
store. This is the Calcformula property:
Sum("Item Ledger Entry".Quantity WHERE (Location Code=CONST(Astore),Item
No.=FIELD(No.)))
- Bstore: Flowfield that calculates how many items are in the B
store. This is the Calcformula property:
Sum("Item Ledger Entry".Quantity WHERE (Location Code=CONST(Bstore),Item
No.=FIELD(No.)))
- TotalStore: Flowfield that sums A and B store. How I do it?
I need to applying filters to Totalstore field. For example:
recItems.SETFILTER(TotalStore,'>%1',0);
Using a table Item function and doing the call on AfterGetRecord Trigger
form is not a good solution for me.
This is an example, I need to adding two or more flowfield fields in a
field.
Thanks for your help.
I have a developing question. I want to create three fields in the
Item table:
- Astore: Flowfield that calculates how many items are in the A
store. This is the Calcformula property:
Sum("Item Ledger Entry".Quantity WHERE (Location Code=CONST(Astore),Item
No.=FIELD(No.)))
- Bstore: Flowfield that calculates how many items are in the B
store. This is the Calcformula property:
Sum("Item Ledger Entry".Quantity WHERE (Location Code=CONST(Bstore),Item
No.=FIELD(No.)))
- TotalStore: Flowfield that sums A and B store. How I do it?
I need to applying filters to Totalstore field. For example:
recItems.SETFILTER(TotalStore,'>%1',0);
Using a table Item function and doing the call on AfterGetRecord Trigger
form is not a good solution for me.
This is an example, I need to adding two or more flowfield fields in a
field.
Thanks for your help.
1
Comments
-
Have you looked at how Inventory is defined in table 27 Item?
You can create a flowfilter field like "Store Filter" similar to "Location Filter" and calculate the Sum not based on the two flowfields but by applying the Sum logic on the field.0 -
Thanks for you answer kapamarou.
The formula that I have to use it in TotalStore flowfield is more complex. Is like this:
TotalSotre:=Inventory+"Qty. on Purch. Order"-(AStore+"Qty. on Sales Order"+"Qty. on Sales Deposit"
+"Qty. on Production orders"+"Minimum stock"+BStore)
How I do it if all of the fields in this formula are flowfields?0 -
No way by flowfield. You cannot sum values from different tables.
Why you don't want to use a function? If not, you have to use normal field and update its value when you need it or while posting etc.Ufuk Asci
Pargesoft0 -
Thanks ufuk.
I need a flowfield because there are a lot of points in Dynamics that I have to update this value manually. It's a value that is linked with stock.
One solution would be update this value on table triggers, but not always a field is added/updated/deleted with TRUE parameter.0 -
Did you find a solution for this? Or anyone knows how to do it in Microsoft Nav 2018?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