FieldClass - FlowFilter

FlowFilters control the calculation of FlowFields in the table (when the FlowFilters are included in the CalcFormula). FlowFilters do not contain permanent data, but instead contain filters on a per user basis, with the information stored in that user's instance of the code being executed. A FlowFilter field allows a filter to be entered at a parent record level by the user (for example, G/L Account) and applied (through the use of FlowField formulas, for example) to constrain what child data (for example, G/L Entry records) is selected.

A FlowFilter allows us to provide flexible data selection functions to the users. The user does not need to have a full understanding of the data structure to apply filtering in intuitive ways to both the primary data table and also to subordinate data. Based on our C/AL code design, FlowFilters can be used to apply filtering on multiple tables subordinate to a parent table. Of course, it is our responsibility as developers to make good use of this tool. As with many C/AL capabilities, a good way to learn more is by studying standard code as designed by the Microsoft developers of NAV, then experimenting.

A number of good examples on the use of FlowFilters can be found in the Customer (Table 18) and Item (Table 27) tables. In the Customer table, some of the FlowFields using FlowFilters are Balance, Balance (LCY), Net Change, Net Change (LCY), Sales (LCY), and Profit (LCY) where LCY stands for Local Currency. The Sales (LCY) FlowField FlowFilter usage is shown in the following screenshot:

Similarly constructed FlowFields using FlowFilters in the Item table include Inventory, Net Invoiced Qty., Net Change, Purchases (Qty.), as well as other fields.

Throughout the standard code, there are FlowFilters in most of the master table definitions. There are the Date Filters and Global Dimension Filters (global dimensions are user-defined codes that facilitate the segregation of accounting data by groupings such as divisions, departments, projects, customer type, and so on). Other FlowFilters that are widely used in the standard code are related to Inventory activity such as Location Filter, Lot No. Filter, Serial No. Filter, and Bin Filter.

The following pair of screenshots show two fields from the Customer table, both with a data type of Date. On the left side of the screenshot is the Last Date Modified field (FieldClass of <Normal>); on the right side of the screenshot is the Date Filter field (FieldClass of FlowFilter). It's easy to see that the properties of the two fields are very similar except for those properties that differ because one is a Normal field and the other is a FlowFilter field:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset