Error when trying to link a Flow Filter to a Normal Field in a Query.

dvdCasey1997
Member Posts: 7
Hi All,
I'm a Developer and quite to to using Dynamics NAV. At the moment I'm trying to set up a query which uses the sum of a field on the Item Ledger Entry table, linked to the Item Table (via. Item Number), and the Location Table via. Location Code. The Item table is Linked the Location table using the data item link 'Location Filter=Location.Code'. Once this query is ran, I get the following error: "The following SQL error was unexpected: Invalid column name 'Location Filter'. Statement(s) could not be prepared." My theory is that (in a query) Flow Filters can't be linked to normal fields in a query (or at least can't be used as a Data Item Link). Is my theory correct and if (or not so) is there a solution to this problem?
NOTE: All 3 Data Items are Necessary in my Query to achieve the results I desire.
Many Thanks.
I'm a Developer and quite to to using Dynamics NAV. At the moment I'm trying to set up a query which uses the sum of a field on the Item Ledger Entry table, linked to the Item Table (via. Item Number), and the Location Table via. Location Code. The Item table is Linked the Location table using the data item link 'Location Filter=Location.Code'. Once this query is ran, I get the following error: "The following SQL error was unexpected: Invalid column name 'Location Filter'. Statement(s) could not be prepared." My theory is that (in a query) Flow Filters can't be linked to normal fields in a query (or at least can't be used as a Data Item Link). Is my theory correct and if (or not so) is there a solution to this problem?
NOTE: All 3 Data Items are Necessary in my Query to achieve the results I desire.
Many Thanks.
0
Best Answers
-
Thank you very much for the suggestion.
I'm afraid it doesn't solve the issue. I've probably explained this poorly, apologies. What I would like my query to do is show the sum of a certain field from the Item Ledger entry table, for every Item, based on a certain location.
I think I will just try to create a function using the Item No. & Location Code as parameters to achieve the desired result.
Many Thanks Again.0 -
Okay, so one of the other members of my Development team was actually able to figure out the issue (I now feel extremely silly
) it was just a matter of having both the item number, and relevant Item Ledger Entry field as columns in the query which are if the Item Ledger Entry DataItem. Then, to group the relevant ILEs by the Item No. we simply made the Quantity column a method of type sum.
Apologies for the poor explanation beforehand.0
Answers
-
I'm not clear what you want to achieve with your query. Anyway, a FlowFilter field is a virtual field which might hols a filter during runtime. The fields does not have a value and does not exist on SQL Server.
You might be able to use a FlowField in the DataItemTableFilter property, and it will be used in calculating FlowFields.
You might want to link the Location record to the Location Code field in the Item Ledger Entry, and possibly set a filter on that same field in your query, as an Item is not usually associated with any particular Location (other than possibly by a Stock Keeping Unit, and indeed, the Item Ledger Entries).1 -
Thank you very much for the suggestion.
I'm afraid it doesn't solve the issue. I've probably explained this poorly, apologies. What I would like my query to do is show the sum of a certain field from the Item Ledger entry table, for every Item, based on a certain location.
I think I will just try to create a function using the Item No. & Location Code as parameters to achieve the desired result.
Many Thanks Again.0 -
Okay, so one of the other members of my Development team was actually able to figure out the issue (I now feel extremely silly
) it was just a matter of having both the item number, and relevant Item Ledger Entry field as columns in the query which are if the Item Ledger Entry DataItem. Then, to group the relevant ILEs by the Item No. we simply made the Quantity column a method of type sum.
Apologies for the poor explanation beforehand.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