QuivaWorks has two rule engines. This is the other one
They share a word and nothing else.What a rule is
A rule is attached to one thing on the form — a placed field, a row, or a presentational element — and has three parts:A property
A condition
A description
and / or instead.Writing a condition
A condition is a JSON object with one key — the operator — whose value is the list of things it operates on.{"var": "field_name"} reads an answer.
request_type is equipment.
var reads any field on the form, not just nearby ones. Nested fields use a dot —
{"var": "contact.country"} — exactly as they are written when placing a field.
You rarely type this by hand. The Rules tab’s Generate box turns a plain-language sentence
into the expression for you; see The rule assistant. The Raw tab is
there when you want to write or adjust the JSON directly.
The operators that work
This is the complete set. Anything not on this list does not exist, and a rule using it is ignored when the form runs.Comparing
Comparing
Combining
Combining
Membership and text
Membership and text
Arithmetic
Arithmetic
+ - * / % min maxMostly used with the Value property, to fill a field in from other answers.Working over a list
Working over a list
{"var": "…"} refers to the item, not the record: {"var": "qty"} is that
item’s quantity.Presence and structure
Presence and structure
var, not val. Both evaluate correctly, but only var is understood by the Form logic
overview, so a rule written with val appears to depend on nothing and the “this rule reads a field
that is not on the form” warning stops working for it.How values behave when nothing has been answered
The most common surprise is a rule that reacts to a field nobody has filled in yet. These are the behaviours worth knowing, all of them observed rather than assumed.if is the reliable form — the var fallback and
?? both let an empty answer through:
{"in": ["…", {"var": "accessories"}]} is a substring test, not a membership test — "top"
matches "laptop,desktop". Where this matters, type the field as a list so in tests real
membership.When a rule cannot be evaluated
A condition the engine cannot run — an operator that does not exist, a malformed expression — has no opinion, and the rule is skipped entirely:equals is not an operator, so that rule does nothing at all — the field it guards behaves as if
the rule were not there. That is deliberate: a question showing when it should not is a nuisance, a
question that has silently vanished is a lost answer.
The rule card says so while you are writing it. A rule naming an operator the engine does not have
carries a red note above the description, listing the offending names:
This rule uses an operator the form engine does not support: equals. It will be ignored when the
form runs.
Two habits still worth keeping:
Check the summary line on the rule card
contains(notes, "urgent") — the summary could not be produced. Arithmetic and list operators
read that way legitimately, so it is a prompt to look, not a verdict.Preview the form both ways
What conditional visibility does and does not clear
When a form is submitted, anything hidden at that moment is stripped out before validation and before saving. That is the point of conditional forms: an answer given under one branch and then hidden when the branch changed does not survive onto the record, and does not block submission by being required. The clearing follows every container that removes a field from view — a row, a Card, a Collapsable card, a Repeater, and the field’s own rule. A field is cleared when it sits, at any depth, under something hidden. Required-ness follows visibility, on both sides. A hidden field’s answer is pruned and its schemarequired is skipped, and the form tells the server which refs its rules hid so the save is
not rejected either. A question nobody could see never blocks a submission.
hidden_fields. See
Records.Which answers a rule can see
By default, every rule reads the whole record being filled in, wherever on the form it is attached. A rule on the last row can read the first question. That stays true even when the form is being filled a section or a step at a time: each step is checked against the whole record, and only the messages belonging to that step’s own fields are shown. A rule on step four that depends on an answer from step one therefore evaluates correctly, and a required field further along does not block the step in front of it.Rules inside a repeater
A repeater is the exception. Its item fields render against one item, so a rule attached to a field inside a repeater reads that item’s answers, not the record’s. Inside aline_items repeater,
{"var": "qty"} is this line’s quantity.
To ask about a repeater’s contents from outside it, use the list operators on the repeater’s own
field:
Worked examples
Every example below has been run against the engine that ships in the product.Show a row only for one kind of request
Show a row only for one kind of request
Require a field once another has been answered
Require a field once another has been answered
Show something only when two things are true
Show something only when two things are true
Show for any of several teams
Show for any of several teams
Show when a note mentions something
Show when a note mentions something
Show based on a nested answer
Show based on a nested answer
Show when a number falls in a range
Show when a number falls in a range
Show when a list has anything in it
Show when a list has anything in it
Show when any line item qualifies
Show when any line item qualifies
Fill a total in from two other fields
Fill a total in from two other fields
Fill a field in differently depending on an answer
Fill a field in differently depending on an answer
Build a label out of two answers
Build a label out of two answers
Turn something on or off permanently
Turn something on or off permanently
true or false, written in the Raw tab, is a complete and valid rule. The
summary reads always or never (always off). Useful for parking a field as read-only, or for
switching a section off without deleting it.