Number field

A numeric input with min/max bounds, step increments, optional thousands separators, and percentage formatting.

The Number field captures integer or decimal values with proper numeric semantics: the on-screen keyboard is numeric on mobile, paste only accepts numerics, and arrow keys step the value.

It binds to SharePoint's Number column type.

Common properties

PropertyDescription
label
string
Visible label.
description
string
Helper text.
placeholder
string
Greyed example text.
required
boolean
default: false
Marks the field required.
readOnly
boolean
default: false
Disables editing.

Type-specific properties

PropertyDescription
min
number
Smallest allowed value. Inclusive.
max
number
Largest allowed value. Inclusive.
step
number
default: 1
Increment used by arrow keys and the up/down spinner.
decimals
number
default: 2
Decimal places used when displaying the value.
percentage
boolean
default: false
Format as a percentage: user types 15, stored as 0.15.
thousandsSeparator
boolean
default: true
Group thousands using the current locale separator.
allowNegative
boolean
default: true
Reject negative values when false.

JavaScript recipes

Read & coerce the value

const qty = Number(f365.field('Quantity').value ?? 0);

Compute a derived total

f365.events.onChange('Quantity', () => updateTotal());
f365.events.onChange('UnitPrice', () => updateTotal());
function updateTotal() {
  const qty = Number(f365.field('Quantity').value ?? 0);
  const price = Number(f365.field('UnitPrice').value ?? 0);
  f365.field('LineTotal').value = qty * price;
}

Range validation message

f365.field('DiscountPct').on('validate', (v) => {
  if (v == null) return;
  if (v < 0 || v > 30) return 'Discount must be between 0 and 30%.';
});

Related articles

  • Currency field

    A money input with currency-symbol prefix, thousands separators, two-decimal rounding, and per-locale formatting.