Skip to main content

Decimal

Decimal fields store floating-point numbers with configurable precision.

View all settings
SettingDescription
Field NameText input, required. Unique identifier for the field.
Input TypeDropdown, required. Choose Decimal, Double, Float, or Real.
Default ValueNumber input. Pre-filled value for new records.
Display LabelText input. Human-readable label shown in forms.
Sort OrderNumber input, defaults to 0. Position in field lists.
IconIcon picker. Visual identifier.
StatusToggle, defaults to true. Enable or disable the field.
RequiredCheckbox. Make the field mandatory.
DescriptionText area. Documents the field's purpose.
Form VisibilityDropdown. Show in Add, Edit, or Both forms.
DB Field NameText input. Custom database column name.
Faker TypeDropdown. Generate test data.
Use as IndexCheckbox. Create database index for performance.
Populate from Logged-In UserCheckbox. Auto-fill from user session.
Min ValueNumber input. Minimum allowed value.
Max ValueNumber input. Maximum allowed value.
PrecisionNumber input. Total digits (before and after decimal).
ScaleNumber input. Digits after the decimal point.

Input Types

  • Decimal — Exact numeric with user-defined precision. Best for currency and financial data
  • Double — 8-byte floating-point with ~15 digits precision. Good for scientific calculations
  • Float — 4-byte floating-point with ~7 digits precision. Saves storage but less precise
  • Real — Alias for Float in PostgreSQL

When to Use

Choose Decimal over Number when:

  • You need fractional values (prices, measurements)
  • Precision matters (financial calculations)
  • Working with scientific or statistical data

Settings

See Common Settings for shared options.

Not available: Primary Key, Unique

Validation (Advanced Settings)

SettingDescription
Min ValueMinimum allowed value.
Max ValueMaximum allowed value.
PrecisionTotal number of digits (before and after decimal).
ScaleNumber of digits after the decimal point.

Use Cases

  • Prices and currency amounts (use Decimal with precision)
  • Measurements (weight, dimensions, distance)
  • Percentages and ratios
  • Scientific data and calculations