What a formula is
Think of a formula as a small machine. A value goes in, and a different value comes out. The value that goes in is the before. What the formula gives back is the after. The data stored on the record never changes. Say your list has people whose emails were typed in all kinds of capitalization. This formula cleans them up:
In every table in these articles, the quotes around text show where it starts and ends, so you can see spaces. The quotes are not part of the value.
A formula can give back two kinds of answer, depending on where you type it.
How MK works out a formula
Every formula follows the same five steps.- MK picks one record. For example, one person in your list.
- The formula reads fields from that record. You name each field you want, such as
$`person.title`. - MK works out the formula from the inside out, one small piece at a time. Parentheses make a piece go first.
- The formula gives back exactly one answer.
- MK repeats all of this for the next record.
A formula only sees the record it is working on. It never changes your data.
Words you will see
These words come up in every formula article. The formula reference has the full list.
The no-data cases cause most formula surprises. Handle blank and messy values in formulas covers them.
When to use a formula
The built-in filter picker is the best place to start. It offers four tests: is, contains, is empty, and is set. When you add several filters, a record must pass all of them. Use a formula when the picker cannot say what you need.
You can use both kinds together on one list. The built-in filters and your formula filters all apply.
What formulas cannot do
- Look at other records. A formula on a list reads data on the record in that row. It cannot look at other rows, and it cannot follow a person to their company.
- Change your data. A formula only shows or tests a value.
- Use today’s date. Formulas have no clock, so you cannot ask for “the last 30 days.” The formulas FAQ explains what you can do with dates.
- Use anything outside the supported set. MK rejects a formula that uses something it does not support.
Where formulas appear in MK
You can type formulas in the Filters and Columns sections of a list. MK also uses formulas in places such as policy and motion rules. An admin usually sets those up. They all use the same language.Related articles
- How formulas find your data
- Filter a list with a formula
- Add a calculated column to a list
- Formula reference: concepts, functions, and operators
- Formulas FAQ