Fieldia

Features · Rules and actions

The page decides.
Your code does not have to.

When a field shows, when it is required, what a total comes to, what a button does: written once in the page, as short expressions and steps, and run the same in every framework. This order is live. Add a chair.

Show, hide, require, lock

Fields that appear when the answer calls for them

Each field can be shown, required or locked by a condition on the others, such as role == ’other’. The page says it once; the form follows it on every keystroke.

  • invisible, required and readonly as conditions, on fields, groups, tabs and steps
  • Conditions on who is looking, and on values your app passes in
  • A hidden field’s answer is never sent
  • Checked when the page loads: a misspelt field name is caught at once

Worked out as people type

Totals, discounts and dates that keep themselves right

A value can be worked out from others: a line’s subtotal, an order’s total, a discount past a threshold, days between two dates. People may still change what the page set.

  • compute: sum, count, round, days and if, over fields and lines
  • setWhen: a value set by a condition, and left to the person after
  • Answer rules: an error that stops a send, or a warning that does not
  • Lines, totals and taxes, as a spreadsheet would

Buttons that run steps

A button says what it does, step by step

Buttons run steps written in the page: set a value, save, open another page as a dialog or a side panel and take its answer back, post to the chatter, archive, duplicate.

  • Sixteen kinds of step: set, save, open, call, ask, check, say, post and more
  • Open a page in a dialog or a side panel, from any side, and bring its answer back
  • A button busy while its steps run, never pressed twice
  • Buttons shown by condition, as a record’s header shows them

Ask first, then your server

The questions and checks before anything is sent

Before a save or a send, a page can check its fields, ask the person, and call your server, which answers with values, words, another page or a stop.

  • beforeSave and afterSave moments, on the page
  • ask: a question with OK and Cancel, Cancel keeping everything
  • call: your app’s own action, answered with values or a stop
  • say: words to the person, in a toast, by tone

Kept right

Rules you can trust

  • Checked earlyEvery name and condition in a page is checked when it loads, with the path to anything wrong.
  • Only dataRules are expressions, not code: a page from a database or a designer cannot run anything.
  • The same everywhereOne engine runs the rules in plain JavaScript, React, Vue and Angular.
  • Seen in plain wordsThe designer shows each rule as a sentence, and what it changes.

Write the rules once, in the page

Conditions, values and steps live in the JSON beside the fields they are about.