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

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 - 

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

Future - What Next After NAV 2016. Code Name - Madeira...

Hi All, While Browsing web I came across some article which says about next release of Microsoft Dynamics NAV. Let's see the History of Code Names Given to Previous Version  - NAV 2013 - Code Name 'Sicily' NAV 2015 - Code Name 'CRETE' NAV 2016 - Code Name 'CORFU' And as we all know that all these are the Islands.