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.
0
Answers
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).
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.
Apologies for the poor explanation beforehand.