> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allgoodhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Formulas FAQ

> Answers to common questions about MK formulas: who can use them, dates, live data, company fields, and how they compare with formulas in other tools.

Short answers to the questions people ask most about MK formulas. For a full walkthrough, start at the [formulas overview](https://docs.allgoodhq.com/mk/formulas/index.md).

## Do I need to know how to code to write a formula?

No. Most formulas you will write are one line, such as a check that a field has a value or a comparison between two values. The [formula reference](https://docs.allgoodhq.com/mk/formulas/reference.md) shows each piece with a before and after example you can copy.

Formulas use a small, restricted part of the JavaScript language. If you do know JavaScript, expressions like `.toLowerCase()` and `a ? b : c` work the way you expect. Statements, regular expressions, and anything that changes data do not.

## Does a formula change my data?

No. A formula reads fields and gives back an answer. In a list, the answer decides which records stay, or what a column shows. The values stored on the record stay the same.

## Where can I type a formula?

In the **Filters** and **Columns** sections of a list, using the **+ ƒx** button. MK also uses formulas in places such as policy and motion rules. An admin usually sets those up.

## Who can use formulas?

Anyone who can edit lists can add a formula filter or column and save it. Exporting a list is limited to people who manage MK. Policy and other setup formulas are limited to people who manage MK as well. If you cannot see an option, ask an admin to check your role.

## When should I use a formula instead of a built-in filter?

Use the built-in filter when you can. Use a formula when you need "this or that," a number comparison, a comparison between two fields, text matching that ignores capitalization, or a calculated column. [What formulas are and when to use one](https://docs.allgoodhq.com/mk/formulas/what-formulas-are.md) has a table that helps you decide.

## Is the data live?

A list uses the data in MK at the moment it loads. Reload the list and formulas use the latest data. Data from an outside system, such as Salesforce, appears after MK syncs it. How often that happens depends on how the system is connected, so ask your admin if you need to know.

## Can a formula use dates?

Partly. Formulas have no clock, so they cannot work out "today" or "the last 30 days." The list filter has no date options either.

You can compare a date field to a fixed date, as in ``$`person.createdDate` < '2026-01-02'``. Formulas compare dates as text in alphabetical order. That gives the right answer when the field stores dates as year-month-day, such as `2026-01-01`. A value with a time on it sorts after the same date without one, so compare against the next day to include the whole day. Check how your field stores dates on its **Data Shape** page before you rely on this.

## Can a formula on a people list use company fields?

No. A formula on a list reads the record in each row. It cannot follow a person to their company. Two workarounds exist:

* Use a person field that carries the company detail, such as `person.companyName`.
* Build the list on the companies side, where `company` fields are available.

## Why does the text "no" count as yes?

In a formula, any text that is not empty counts as true. That includes `'no'`, `'false'`, and `'0'`. To read a field that holds words like these as yes or no, wrap it in `flag()`. It reads `true`, `t`, `yes`, `y`, `on`, and `1` as true, in any capitalization. See [Handle blank and messy values in formulas](https://docs.allgoodhq.com/mk/formulas/handle-blank-values.md).

## Why is my formula blank on every row?

The most common cause is a wrong field name. A formula reads a misspelled name as "no value" and does not warn you. Check the exact name on the record type's **Data Shape** page. Names are case-sensitive. See [Formula gives a blank, wrong, or error result](https://docs.allgoodhq.com/mk/formulas/not-working.md).

## Which record does a formula read when a person has several of one type?

The one MK created most recently. If two were created at the same moment, MK uses the one with the higher internal ID.

## Can I use regular expressions?

No. Formulas support plain text functions such as `.includes()`, `.startsWith()`, `.replaceAll()`, and `.split()`. The text you search for must be typed into the formula as fixed text. The [formula reference](https://docs.allgoodhq.com/mk/formulas/reference.md) lists what is available.

## How do MK formulas compare with formulas in other tools?

The idea is similar to a formula field in a tool such as Salesforce or Marketo, where you work out a value from other fields. For example, Marketo has [formula fields that join text from other fields](https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/administration/field-management/create-and-use-a-concatenated-string-formula-field). Velocity scripting is different. It writes display content into an email, so its MK equivalent is Liquid in the email, not a formula. See [Coming from Marketo: formulas in MK](https://docs.allgoodhq.com/mk/formulas/coming-from-marketo.md). An MK formula in a list does not create a field or store a result. It works out the answer when the list loads.

## Can I use a formula in an email?

Not as a formula. Emails are personalized with merge fields and Liquid, not ƒx formulas. See [Personalizing an email](https://docs.allgoodhq.com/mk/content/email/emails/personalizing-an-email.md) and [Liquid recipes for emails](https://docs.allgoodhq.com/mk/content/email/emails/liquid-recipes.md).

## Related articles

* [Formulas overview](https://docs.allgoodhq.com/mk/formulas/index.md)
* [What formulas are and when to use one](https://docs.allgoodhq.com/mk/formulas/what-formulas-are.md)
* [Formula gives a blank, wrong, or error result](https://docs.allgoodhq.com/mk/formulas/not-working.md)
* [Formula reference: concepts, functions, and operators](https://docs.allgoodhq.com/mk/formulas/reference.md)

If your question is not answered here, contact allGood support.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.