Currency field

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

The Currency field is a numeric input specialised for money values. It always rounds to two decimal places, displays the currency symbol as a prefix, groups thousands using locale formatting, and stores the value as a plain number in SharePoint.

It binds to SharePoint's Currency column type.

Common properties

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

Type-specific properties

PropertyDescription
currency
string (ISO 4217)
default: inherited from list
Currency code, e.g. USD, EUR, AUD. Inherits from the column setting unless overridden.
min
number
Smallest allowed value.
max
number
Largest allowed value.
allowNegative
boolean
default: false
Reject negative values (useful for invoices).

JavaScript recipes

Display a running total

f365.events.onChange('LineItems', () => {
  const total =
    f365
      .control('LineItems')
      .asLinkedList()
      ?.rows()
      .reduce((sum, r) => sum + (Number(r.Amount) || 0), 0) ?? 0;
  f365.field('Total').value = total;
});

Format for display in a custom UI element

const formatted = f365.format.currency(f365.field('Amount').value, { currency: 'AUD' });
//                                                                     ^ optional override

Approval threshold trigger

f365.events.onBeforeSave(async () => {
  if (Number(f365.field('Amount').value) > 10_000) {
    const ok = await f365.ui.showConfirm(
      'Amounts over $10,000 require manager approval. Submit for approval?'
    );
    if (!ok) return { cancel: true };
    f365.field('ApprovalStatus').value = 'Pending';
  }
});

Related articles

  • Number field

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