Quickbase Tips

Reuse Quickbase formula logic in your code with the Run a formula API

API & integrationsFormulasDecember 1, 2026
Short answerThe RESTful API's Run a formula endpoint evaluates a Quickbase formula on demand, optionally in the context of a record, and returns the result, without creating a field. Use it to keep business rules in Quickbase's formula language and call them from code pages, scripts and integrations.

The problem

The same business rule, such as a due-date calculation, a status rule or a price, ends up written twice: once as a Quickbase formula and again in JavaScript or PHP for an integration. The two drift apart, and nobody knows which one is right.

The fix: run the formula through the API

The RESTful API has a Run a formula endpoint (POST /v1/formula/run). You send a JSON body with:

  • formula: any valid Quickbase formula
  • from: the table ID
  • rid (optional): a record ID, for formulas that reference a record’s fields. Formulas like User() don’t need one.

It returns the formula’s result, without needing a field on the table.

const res = await fetch('https://api.quickbase.com/v1/formula/run', {
  method: 'POST',
  headers: {
    'QB-Realm-Hostname': 'yourcompany.quickbase.com',
    'Authorization': `QB-USER-TOKEN ${token}`, // or QB-TEMP-TOKEN in a code page
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    from: 'bxxxxxxxx',
    rid: 1042,
    formula: 'WeekdayAdd([Start Date], [Duration Days])',
  }),
});
const { result } = await res.json();

Good uses

  • One source of truth for rules: calculate due dates, statuses or eligibility in Quickbase’s formula language, and call it from code.
  • Testing formulas against specific records from a script before saving them in a field.
  • Code pages that need a calculated value without adding yet another formula field to the table.

Gotchas

  • It’s still an API call, so it counts toward rate limits. Don’t call it in a tight loop over thousands of records; batch the logic or store results instead.
  • Permissions apply. The formula runs as the token’s user and only sees what that user can see.
  • Formula queries cost the same here as in a field, so the formula query performance rules still apply.

Seeing more than one of these problems? Find where your Quickbase is on the journey, and what usually fixes it.

Bigger than a quick fix?

Integrations

Connect Quickbase to QuickBooks, Microsoft 365, Google Workspace, payment processors and any system with an API.

Single integration package · From $4,950

Have a Quickbase problem that needs solving?

Tell us what is slowing you down. A 30-minute call is free, and you will leave with a clear next step whether or not we work together.

Book a free call

Loading available times…