Thursday, March 21, 2019

Dynamics NAV - Flowfilters and Flowfields to rapidly calculate totals without cycling through records


  • A flowfilter can be used to store filters which will be used by a flowfield that is connected to a flowfilter
  • By default, if the flowfilter value is blank, it is not applied to the flowfield (just like a regular filter)
  • Therefore you can add any number of flowfilters to a flowfield, and it will not affect the value until the flowfilter value is updated
    • How do you update the flowfilter values?
    • CAL Example where Item2."Date Filter" is a flowfilter, and Item2."Net change" is a flowfield that is configured to use Item2."Date filter" in it's flowfield setup

    Item2.SETRANGE(Item2."No.",Item."No.");
    Item2.SETFILTER(Item2."Date Filter",'%1..%2',dDay0+1,TODAY);
    Item2.CALCFIELDS(Item2."Net Change");
    Item.CALCFIELDS(Item.Inventory);

No comments:

Post a Comment