Numeric Equation Settings

When configuring numeric equation fields in Knack, you have various formatting options to control how calculated results appear to users. This article explains the available settings and how they impact the display of your equation results.

What You'll Learn

This guide walks you through the various formatting options available for numeric equation fields. You'll discover how to properly set decimal places, apply rounding rules, add currency symbols, and format large numbers for better readability. By mastering these settings, you'll be able to present calculated data in the most appropriate format for your users.

Overview

Numeric equations can perform calculations on field values, numbers, and other mathematical functions, while also providing the flexibility to format the results in a variety of number formats with decimals, rounding, currency, and more.

When the "Equation Type" is set to "Numeric" in the field's settings, the equation field recognizes the equation as a "numeric equation" and understands the type of data it will be working with.

Note: Result Format options in equation fields' settings such as decimals and rounding are for display only. For example, an equation that uses division will store all the extra decimals in the database, regardless of the Result Format settings applied.

When using the round, ceil, or floor function, the resulting value will be stored in the database. Using these functions is recommended for achieving accurate rounding in your equations.

Result Format Settings

Decimals

Specifies how large numbers will be separated, either by commas, decimals, or with no separation.

Decimal Places

When displaying the results of the numeric equation, you can choose how many decimal places to include. It's important to note that this setting only affects how the numbers are displayed, not how they are stored in the database.

  • If the stored number has more decimal places than what you specify, the displayed number will be rounded accordingly.

Rounding

You have the option to round the number either up or down. By default, numbers that end in a digit below 6 will be rounded down, while numbers that end in a digit 6 or above will be rounded up.

Thousands Delimiter

To make large numbers easier to read, you can choose to separate them with commas. For instance, "80000" would be displayed as "80,000".

Number Format

You can format your number using currency symbols, percentages, or by personalizing the text that appears before and after the number. For example:

  • Adding "$" before the number for currency values
  • Adding "%" after the number for percentages
  • Custom text like "Approx. [number] items" for context-specific formatting

Tip: For information about date equation settings, see our related article on Date Equation Settings.