Decimal
Decimal fields store floating-point numbers with configurable precision.
View all settings
| Setting | Description |
|---|---|
| Field Name | Text input, required. Unique identifier for the field. |
| Input Type | Dropdown, required. Choose Decimal, Double, Float, or Real. |
| Default Value | Number input. Pre-filled value for new records. |
| Display Label | Text input. Human-readable label shown in forms. |
| Sort Order | Number input, defaults to 0. Position in field lists. |
| Icon | Icon picker. Visual identifier. |
| Status | Toggle, defaults to true. Enable or disable the field. |
| Required | Checkbox. Make the field mandatory. |
| Description | Text area. Documents the field's purpose. |
| Form Visibility | Dropdown. Show in Add, Edit, or Both forms. |
| DB Field Name | Text input. Custom database column name. |
| Faker Type | Dropdown. Generate test data. |
| Use as Index | Checkbox. Create database index for performance. |
| Populate from Logged-In User | Checkbox. Auto-fill from user session. |
| Min Value | Number input. Minimum allowed value. |
| Max Value | Number input. Maximum allowed value. |
| Precision | Number input. Total digits (before and after decimal). |
| Scale | Number 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)
| Setting | Description |
|---|---|
| Min Value | Minimum allowed value. |
| Max Value | Maximum allowed value. |
| Precision | Total number of digits (before and after decimal). |
| Scale | Number 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
Related
- Common Settings — Shared settings reference
- Number — For whole numbers