Flow Fields in Dynamics NAV

I don’t know the exact business reason but someone asked how to identify all sales shipping orders with any negative quantities on them.  They needed to print these separately from the shipments that only have all positive quantities.

Here is one way to solve this problem

In NAV, open Sales Shipment Header


Add a field of type Boolean (The field type should match the value you expect to return from the flow field method.  In this case we will use an exist so we expect a bool but we could have used a Sum, Average, Min, Max, Count, or a Lookup to return a value).


Define it as a flow field and click on the ellipse next to CalcFormula



Now [Has Negative Qty] is false if no negatives exist


And [Has Negative Qty] and true if a negative exist


So it is ready to be used as a filter on the report.


Don’t forget that if you are using it in code, you may need to CalcFields.

Hope that helps.  If you really can’t afford the field in your header, you can use code to check the lines for a negative value each time and use a skip or break function to skip that header record but it seems expensive to check them all if you only want a few to print.

Please let me know if you think of a better solution.


# re: Flow Fields in Dynamics NAV
Gravatar I have a similar scenario.

But instead of being related to a "phisical" field such as Quantity, I need to perform a filter over a FlowField Field.

I haven't found already the way to get the expected results.

It's necessary sth like "CalcFields"?

Left by Jorge on 4/16/2013 10:17 AM
# re: Flow Fields in Dynamics NAV
Gravatar Jorge,
You can not filter a flow field. Often you can look at what comprised the flow field and actually replicate that logic. If you use the contact form to send me more details about your situation and what version of NAV and your email address, I would be happy to help further.
Left by Teresa on 4/16/2013 10:35 AM
Comments have been closed on this topic.