Sum(MyTab.Quantity WHERE ( Item No.=FIELD(No.), Status=FILTER(s1|s2), Location Code=FIELD(Location Filter), Requested Receipt Date=FIELD(Date Filter) ))Since the table MyTab is shared between the companies (DataPerCompany=No) and there are some items that are shared between companies, I want to add another filter on the company name...
Company=FILTER(COMPANYNAME)but it didn't work...
Comments
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Infact, the data in MyTab is shared and the filed Company contains the company name from which the line was inserted...
I want that my flowfield gives me the sum of the lines that belong to the company I am logged in...If I am in copm1, I want the flowfield to just consider the lines with Company=comp1...
How to do so?
i think you have tow options of solving this in NAV
Option 1
As you only have filter line of type FIELD, CONST or FILTER. In case of the latter two (CONST/FILTER) the value you provide needs to be a static value (and COMPANYNAME is no static). If you use the first (FIELD) you need to have a field with company name in both the source table (i.e. the table the FlowField is 'looking at') and target table (i.e. the table the FlowField is 'looking from'/defined on).
Option 2
You have to build a function that actually does what the FlowField you would like to have does and use this as the SourceExpr on the control on the page where you want to display the value.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
FD Consulting
Frank, indeed a valid option, that didn't come to my mind (which I am 'breaking' now that I haven't thought of it myself :shock:).
But then you have to populate it, either manually (which I recon this is not what poppins is looking for) or by code using COMPANYNAME on the page(s) your are calling the FlowField from.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community