Most builders bolt together a different mini-language for every place you might need "if X then Y" logic — one syntax for showing a field, another for computing a default, another for coloring a table row. That's more to learn, and more places for the same logic to quietly behave differently. MergePoint runs all of it through one formula engine, so a formula you write behaves identically no matter which feature it's attached to.
This page covers the engine itself — what a formula can look like, how AI writes and explains one for you, and how it runs safely. For a tour of every place you can attach a formula, see Formula Engine: Where It's Used.
A formula is just a string, and MergePoint reads its shape automatically — there's no mode switch to set first:
{{field}}, do arithmetic ({{quantity}} * {{price}}), branch with IF(), join text with CONCAT(), or work with dates via DATE() / NOW(). Most default values, visibility rules, and disable conditions never need to be more than this.elements, record, or form. The engine detects real code automatically (a return, a for loop, dot/bracket field access) and switches shape without you flagging it.A plain sentence that happens to contain the word "return" is never mistaken for code — the detection only fires on actual code patterns, not on coincidental wording.
Every formula field has an Ask AI bar. Describe what you want in plain language — "show this only when the customer selected Enterprise" — and MergePoint writes the formula for you, referencing your actual field names.
The generator is deliberately biased toward the simplest formula that gets the job done. Ask for "total = quantity times price" and you get a readable template, not an over-engineered block of JavaScript for what is genuinely simple math. It only reaches for real JavaScript when your request actually needs it — looping, parsing, or working across many rows at once.
Next to every formula editor is an Explain button. Click it and MergePoint reads the current formula and summarizes what it does in plain English — useful when you're picking up a form someone else built, or checking your own logic before you trust it. The explanation is generated fresh every time you open it; it's a read-only summary, never something that gets saved in place of your formula.
Formulas execute in an isolated sandbox with a hard time limit — a runaway loop or accidental infinite recursion is stopped automatically rather than freezing the form. Code that tries to reach outside the sandbox (the network, browser storage, the page itself) is blocked before it ever runs. You can write logic here with the same confidence you'd have in a locked-down environment, without needing to think about what a formula "could" do.
If a formula has a typo, references a field that no longer exists, or throws an error, MergePoint always fails toward the safer, more permissive outcome for whichever feature it's attached to — for example, a broken visibility formula keeps the field visible rather than hiding it, and a broken disable formula keeps the field editable rather than locking it. A mistake in your logic degrades gracefully instead of trapping you or your respondents.
A tour of all six places a formula can be attached — Global Variables, Default Value, Visibility, Conditional Disable, Data Table formatting, and Field Validation — with a real example for each.
One shared engine — with built-in AI generation, plain-language explanation, and a sandboxed runtime — powers every calculated or conditional behavior in Form Studio.
Show, hide, or lock a field based on a live formula tied to other answers on the form — powered by the same formula engine behind default values and calculated fields.