Dynamics 365 Business Central: Entering Quantities/Amounts by Calculation and Negative Numbers
Business Central supports entering calculations and negative numbers directly into decimal fields, functioning like a mini calculator. This feature works with basic arithmetic operations and combined formulas for quantities and amounts, but only applies to decimal data types.

post Dynamics 365 Lab
"When entering numbers into these fields, you can enter the formula instead of the sum quantity."
Key points
- Decimal fields accept mathematical expressions like 19+19, 41-9, 12*4, or 12/4 that calculate automatically
- Combined calculations work with parentheses like (2+3)*4 as long as there are no spaces in the formula
- Negative numbers can be entered as -20.5 or 20.5- with the final operator determining the sign
- Only decimal data type supports formulas; integer, text, and code fields do not
- Integer fields support negative numbers but text and code fields store formulas as literal text
Quotes
- “When entering numbers into these fields, you can enter the formula instead of the sum quantity.” (Explains the core capability that decimal fields accept formulas rather than just static values)
- “This can only be used for Decimal Data type.” (Clarifies the important limitation that this feature is restricted to decimal fields only)
- “If the last character of the expression is a + or a - , the entire expression will be recorded with that sign.” (Explains the rule for how negative numbers are determined in suffix notation)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- BC Friday Tips #56 Understand Missing Fields in Copy Documents — possibly related: both name Table 37 “Sales Line”
- BC Friday Tips #84 Why Is Your Item Missing from the Sales Line Lookup? — possibly related: both name Table 37 “Sales Line”
- Business Central Development Serie - Part 2b: AI for BC Development — The Knowledge Gap That Ships to Production — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL) — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: How to flow/pass custom field values from Sales Order to Production Order — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: How to note the records that the user has selected on the Subpage/Lines (Page.SetSelectionFilter in part) — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: How to quickly check if a field is a primary key field — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: Quickly get next Sequence/Entry Number (without using FindLast -> Entry No. + 1) — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: Use a default quantity of 1 for all types on documents – Customization — possibly related: both name Table 37 “Sales Line”
- Implementing a Multi-Step Process for AI Recommendations in Business Central — possibly related: both name Table 37 “Sales Line”
Heads up
- warning: “Integer type fields do not support formulas.”
- warning: “div (Integer division) and mod (Modulus) cannot be used.”
- gotcha: “If the last character of the expression is a + or a –, the entire expression will be recorded with that sign.”
- gotcha: “The Text and Code type will save the formula itself as text directly.”
Context
- Features: formula entry in decimal fields, inline calculations, negative number entry, arithmetic operations
Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.