Skip to content

The rating field

Whole numbers drawn as clickable stars: a maximum from 1 to 10, seven shapes, clicking the current value to clear, and filtering above or below a rating.

Updated November 2026

A rating is a whole number shown as symbols you can click, stars by default. It's for quick judgments on a fixed scale, like ease of care, priority, or how much the cat liked it. In the demo plant shop, Ease of care on the Plants table rates each plant out of five, and the supplier's Reliability is a rating too.

Adding a rating field: Maximum, the seven shape buttons, the color row, and the live preview in the field editor.

The options

  • Maximum: the top of the scale, from 1 to 10. The default is 5.
  • Shape: one of seven, which are star, heart, circle, square, diamond, flag and bolt.
  • Color: the default saffron, or any of the twelve pigment colors. The editor's preview shows the cell as it will be drawn.

Editing a rating

Click the third star and the value is 3. To take a rating back to empty, click the star that is the current value and the cell clears. Hovering over the symbols previews the value before you click.

From the keyboard, press Enter on the cell and a small number input opens. Type 4, or 0 to clear. The record panel has the same row of symbols, and it works the same way there.

Whole numbers, clamped

A rating is always a whole number between 1 and the maximum, whichever way it is written. The API rounds 3.5 to 4. A write above the maximum stores the maximum (an 8 on a five-star field stores 5), and zero or less clears the cell. So the stars you see can never disagree with the number that's stored, and the stored number is what filters and summaries read.

Filtering above and below

Ratings filter as numbers. A filter of is at least 4 finds the good ones, and is less than 3 finds the strugglers. There's also is, is not, is empty and isn't empty. An unrated record is empty, not zero, so is less than 3 won't find it and is empty will. In the same way, an average in the summary bar averages the rated records only.

A descending sort puts five-star records first with the unrated ones before them, because blanks come first in a descending sort. Add isn't empty to a filter when that gets in the way.

Over the API

A rating is a plain JSON number:

{ "fields": { "Ease of care": 4 } }

Write a number from 1 to the maximum, keeping in mind the rounding and clamping described above, and clear a rating with null or 0. The maximum is in the field's options (max), which you can read from the fields endpoint.

When it's the wrong field

  • Measured quantities, such as weight, count or price. Use a number. A rating rounds and clamps, which is wrong for a measurement.
  • Named levels. "Low / Medium / High" carries meaning that a star count doesn't. Use a select, which also gives each level a color and a board column.
  • A computed score. A rating is set by hand. If the value should be worked out from other fields, you want a formula.

A rating is stored the same way as the rest of the number family, so converting to a plain number later is free, and the field then shows digits where it showed stars.

About Tabla

Tabla is a no-code database with Postgres underneath. Every feature is on every plan, you get a million records per database, and you can export your whole database in one file any day.

More guides