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)

Dynamics 365 Business Central

Hi, Readers.
I was recently asked an interesting question. When the quantity is 0, why the ‘0’ value on the Sales Order Subform page is not displayed? But the ‘0’ value on the Item Journal page is displayed?

Sales Order: displaying blank only

Item Journals: displaying ‘0’

So, in this post, I would like to talk about how to display zeros (0) on the Sales Order Subform page when the quantity is 0 in Business Central. Hope it will help.

You can find BlankZero Property in the source code of Sales Order Subform page. This is the reason.

BlankZero Property: Indicates whether the system displays zeros (0) and No.

Applies to:

  • Table Field
  • Page Field

Property Value: True if zeros and No are not displayed; otherwise, false. The default is false.

So, if you want to display ‘0’ value on the Sales Order Subform page, you can simply change BlankZero Property to false and you’re done.

The same applies to other fields such as Unit Price.

In addition, there is another property that can control this behavior.

BlankNumbers Property: Indicates whether the system will clear a range of numbers as it formats them.

Applies to:

  • Table Field
  • Page Field

Property Value:

ValueDescription
DontBlankNot clear any numbers. This is the default value.
BlankNegClear negative numbers.
BlankNegAndZeroClear negative numbers and zero.
BlankZeroClear numbers equal to zero.
BlankZeroAndPosClear positive numbers and zero.
BlankPosClear positive numbers.

Note: The property ‘BlankNumbers’ cannot be customized.

Let’s see some examples.

BlankNumbers = DontBlank;

BlankNumbers = BlankZero;

BlankNumbers = BlankNeg;

BlankNumbers = BlankZeroAndPos;

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL