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    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

Error After Restore SQL Backup of NAV 2013 Database

Hi all, we are facing a conman issue during restoring a SQL Database backup restored for NAV 2013. While Trying to run object from Object Designer we get below listed error (even the service is configured properly) - --------------------------- Microsoft Dynamics NAV Development Environment --------------------------- There are no NAV Server instances available for this database. You must ensure that a NAV Server instance is running and is configured to use the database before you perform this activity. --------------------------- OK    ---------------------------