Skip to main content

Flowfield and Flowfilters - #albacktobasics.

Hi Readers,

This year I am starting to talk about basics again.

I still get questions about basics and we all need to understand that basics are important while working on solution for our customers.

In this article we will talk about FlowFields and Flowfilters that was raised in one of the #bcopendiscussion.

Question - Can I use Flowfilter to filter data in page?

With this I thought it would be great to talk about virtual fields in details. In this article we will discuss in details about flowfield and flowfilter. #albacktobasics

FlowFields - 

FlowFields, display the result of the calculation described in the CalcFormula Property. 

Information in FlowFields exists only at run time, values in FlowFields are automatically initialized to 0 (zero).

There are Seven types of FlowFields as shown below.
  • SUM 
    • Sum of a Specific Column. 
    • FlowFields Data Type - Decimal, Integer, BigInteger or Duration
  • Average 
    • Average of a Specific Column. 
    • FlowFields Data Type - Decimal, Integer, BigInteger or Duration
  • Exist 
    • Any records exist in a specified set in a table.
    • FlowFields Data Type - Boolean.
  • Count
    • Number of records in a specified set in a table.
    • FlowFields Data Type - Integer.
  • Min
    • Minimum value in a column in a specified set in a table.
    • FlowFields Data Type - Any.
  • Max
    • Maximum value in a column in a specified set in a table.
    • FlowFields Data Type - Any.
  • Lookup
    • Looks up a value in a column in another table.
    • FlowFields Data Type - Any.

Example - 

If in a table you want to get Quantity that is sold for a customer and a item. To do this you can create a flowfield with CalcFormula to get sum of quantity from Sales Shipment lines as shown below.


Flowfilters -
  • Flowfilters fields to set ranges on the calculations that are shown in FlowFields (only)
  • Flowfilters is only to apply filter on FlowFields. 
  • FlowFields CalcFormula can contain ordinary fields and filters to filter the data during calculation.

Example - 

If you would like to filter the above data with location filter, we will create a new flowfilter and change the CalcFormula of Qty. Sold Flowfield as shown below.


Remember -

  • Both types of Fields are stored in the database.
  • Both types of Fields are not available in SQL Database.
  • Data Classification is not required when you define flowfield & flowfilter.
  • User cannot modify value of flowfield as its a calculated fields.
  • Flowfilter can be used in C/AL or AL code for filtering data in flowfield.

If you have any other basic stuff that you would like to discuss please let me know and I will try to write an article on this.

Let me know your views as comment to this article.

Regards,
Saurav Dhyani
sauravdhyani.com
#albacktobasics

Comments

  1. Nice one Saurav. Many programmers we come across do not know basics like this and try to bluff

    ReplyDelete
  2. Global Dimensions vs shortcut Dimensions

    ReplyDelete

Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing -