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

Welcome - Microsoft Dynamics 365!

Hi All, In this article we will discuss the new introduced member of Dynamics Family. Yes you heard it correctly, one more new member with Name "Microsoft Dynamics 365" . #ProjectMadeira   #Dynamics365

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 - 

NAV 2013 Credential Type - How to Use?

Hi all, Please do these activities when you have time, its a long activity and i would suggest do all activities in one go. So be clam and lets start. For NAV 2013 R2 Refer Here. For NAV 2016 Steps have been Reduced Please Refer Here. I have installed NAV 2013 and its work great with my windows credentials. I was checking the service console (Microsoft Dynamics NAV Administration) in NAV 2013 and found out that Credentials Type have multiple Options.