Dynamics 365 Business Central: How to change Zero (0) of Flowfield field to Dash (-) on the page

Dynamics 365 Business Central

Hi, Readers.
Today I would like to share another mini tip about Business Central, how to change Zero (0) of Flowfield field to Dash (-) on the page. This is an interesting question I saw on the Dynamics 365 Community yesterday. More details: Flow field value format anomaly.

As you know, the FlowFields are used extensively in standard codes. This is a very powerful feature in Business Central and NAV.
FlowFields display the result of the calculation described in the CalcFormula Property. For example, the Inventory field in the Item table shows the current inventory of the item and is calculated as the sum of the Quantity fields for all Item Ledger Entries in this item.

Source Code in Item table:

For some types of FlowField, you can click its value on the page.

The records will be opened.

PS: The format for zero is related to AutoFormatExpression Property and AutoFormatType Property

For example,

Let’s get back to the topic. Is it possible to display a Dash (-) when the value is zero? Yes, there is a very simple way here, which supports both standard fields and custom fields. Just use the BlankZero Property.

BlankZero Property: Indicates whether the system displays zeros (0) and No.
We used this property when discussing Dynamics 365 Business Central mini tips: How to display zeros (0) on the Sales Order Subform page when the quantity is 0 (BlankNumbers Property and BlankNumbers Property)

Let’s look at a simple example, BlankZero = true;

Great.

The same goes for new custom fields.

And, any method that returns a number, such as min and max, is valid. For example,

But please note that this does not work for editable fields. This will normally display as 0.

Great. Give it a try!!!😁

PS: Dynamics 365 Business Central Blog Series: FlowFields

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL