Microsoft Dynamics NAV - C/SIDE Solution Development -

Microsoft Dynamics NAV – C/SIDE Solution Development

Locus IT ServicesMicrosoft Dynamics NAV – C/SIDE Solution Development

Lesson 1: Prerequisite Knowledge in Statistics

Prerequisite Knowledge

Prerequisite Knowledge in Statistics : FlowFilters are useful for limiting calculations so that they include only the values in a column that have specific properties. For example, on the Seminar Statistics page, users may want to sum the total price of a seminar four times, for four time periods (such as week, month, current year, and prior year). This is possible if the application takes advantage of SumIndexField Technology (SIFT) by using FlowFilter fields with the FlowFields. Use FlowFilters to determine how much information the system includes when it calculates the contents of FlowFields. Use a FlowFilter to filter a FlowField.

Using FlowFilters and FlowFields

A FlowField is defined by setting the FieldClass property of the field to FlowField. The CalcFormula property defines the functionality of the FlowField. The CalcFormula can include filter values that are based on constant and/or variable parameters. A FlowFilter is a specific type of filter field that is defined in the same table that contains the associated FlowField. Therefore, you can apply FlowFilters to the source tables on which FlowFields are based.

To implement a statistics page by using the FlowFields and FlowFilter fields in a master table, view Table 18 Customer and Page 151 Customer Statistics. The columns of the Customer Statistics Sales FastTab show the Sales (LCY) field for the following four time periods:

  • This Period
  • This Year
  • Last Year
  • To Date

The data that is shown in these fields is generated by a FlowField, Sales (LCY), and several FlowFilters in the Customer table. The CalcFormula that is shown in the Sales (LCY) field properties uses several FlowFilters, but just consider the Date Filter now.

In the OnAfterGetRecord trigger of the Customer Statistics page, the Date Filter is set for each desired time period by using the Date Filter-Calc codeunit. Then use the CALCFIELDS function for each Date Filter to calculate a value for the Sales (LCY). Use similar logic when you create the Seminar Statistics page.

For more information about SIFT, FlowFields, and FlowFilters, refer to the Microsoft Dynamics NAV 2013 Developer and IT Pro Help.

Locus IT Project Management Office
What’s it?