I have created a flowfield in the item table with the following calcformula:
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…
I tried to add the following line to the filter in the flowfield:
but it didn’t work…
How can fiter on the current company name on a flowfield???
Thanks in advance
You can only set a filter on a table-field, not a system variabel.
And in a shared table there is no standard field telling which company it origins in.
First of all, you’ll need a field in the MyTab record to indicate which Company the data relates to. Then, you’ll also need a key definition in MyTab that includes all of the fields you’re filtering on in the CalcFormula expression, and that specifies Quantity as a SIFT field.
In the Item table, you’ll need to define a flowfilter field to use in setting the Company filter as part of the CalcFormula expression. The field name Company Filter comes to mind. Then you’d modify the CalcFormula expression for the flowfield in the Item table (the one you’re trying to apply a Company filter to) to include something like this …
Company Name=FIELD(Company Filter)
Then, at runtime, you’ll apply a filter to the Company Filter field in the item table. A good example of how to define the fields may be found in the definition of the Debit Amount field in the G/L Account table. For setting the Company Name filter, take a look at the way the Date Filter field is filtered in the form/page G/L Account List.