Flowfield all the same

Mauddib
Member Posts: 269
I have a flowfilter on another table which looks at another table. The Calformula is made up of fields and flowfilter fields. And is made up of store number, date, type etc. The quantity field is being summed.
A similar example would be if i was looking at the purchase lines table and was filtering on type, item no. date
However for each store/date/type the values are all the same. So the quantity for:
Store1 31/12/2005 type1 is 20 and Store2 31/12/2005 type1 is 20.
Store1 31/12/2005 type2 is 110 and Store2 31/12/2005 type2 is 110.
So its as if its ignoring the Store filter but not the rest!!! Any ideas why? Is it something to do with keys on table being looked into?
GaMBe
A similar example would be if i was looking at the purchase lines table and was filtering on type, item no. date
However for each store/date/type the values are all the same. So the quantity for:
Store1 31/12/2005 type1 is 20 and Store2 31/12/2005 type1 is 20.
Store1 31/12/2005 type2 is 110 and Store2 31/12/2005 type2 is 110.
So its as if its ignoring the Store filter but not the rest!!! Any ideas why? Is it something to do with keys on table being looked into?
GaMBe
0
Comments
-
The flowfield definition must include the store as a flowfilter, and the table that you sum must have the Store number as a key field in order to correctly sum the sumindexfield.0
-
And if you use the flowfields in the program, you need to filter it like this:
(e.g. on item-table):recItem.GET('10000'); recItem.SETFILTER("Location Filter",'BLUE'); recItem.CALCFIELDS(Inventory);
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I cant figure it out. I have a field on one table thats a flowfield with the following calc formula....
Sum("Payment"."Amount Tendered" WHERE (Type=FIELD(Code),ID=FIELD(ID Filter),Terminal=FIELD(Terminal),Date=FIELD(Date Filter),Store No.=FIELD(Store Filter),Time=FIELD(Time Filter)))
The Payment table has the following Secondary key with Amount as its sumindexfield:
Type,Date,Store No.,ID,POS Terminal,Time
But its not working at all. Ive looked at the Item table and other examples of the same thing being done and I cant see anything wrong or different.0 -
Mauddib wrote:I cant figure it out. I have a field on one table thats a flowfield with the following calc formula....
Sum("Payment"."Amount Tendered" WHERE (Type=FIELD(Code),ID=FIELD(ID Filter),Terminal=FIELD(Terminal),Date=FIELD(Date Filter),Store No.=FIELD(Store Filter),Time=FIELD(Time Filter)))
The Payment table has the following Secondary key with Amount as its sumindexfield:
Type,Date,Store No.,ID,POS Terminal,Time
But its not working at all. Ive looked at the Item table and other examples of the same thing being done and I cant see anything wrong or different.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Also you need to put the fields in your calcformula in the same order as the key fields.0
-
DenSter wrote:Also you need to put the fields in your calcformula in the same order as the key fields.
And I also noticed that Navision does not always use the same index to calculate the flowfield. It depends which filters are used.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Put the flowfield on a form and drill down. Then you can see the filter and maybe see what is wrong.0
-
Well it's a different thing to index by Date and then by Store, than to index by store and then by date. Maybe technically you will find the correct values, but for sure you understand that it's not properly done to set filters in different orders.
The issue is probably not setting the filter in the first place, or not calculating the values, but I wanted to point out that it is just better programming to set the filters in the same order as the key fields. If anything, it makes for easier code maintenance.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