Formula basics

How a General Caster formula is written: values, operators, conditions, errors, text and numbers, and the step-by-step style.

A General Caster formula is written like a spreadsheet formula. It takes the values of the item’s columns, calculates, and its result is written into the target column.

={item's Price} * {item's Quantity}

The = at the start is optional.

Values

You write It is
{item's Price} The value of a column, inserted with the column button (see Referring to columns)
42, 3.5, -1 A number. Decimals always use a point
"Done" A text, between double quotes. A quote inside a text is written twice: "He said ""hi"""
TRUE, FALSE Yes and no

Operators

Operator Does Example
+ - * / Adds, subtracts, multiplies, divides {item's Price} * 1.22
^ Raises to a power 2 ^ 10 → 1024
% Divides by 100 {item's Price} * 15%
& Joins texts {item's First name} & " " & {item's Last name}
= <> Equal, different {item's Status} = "Done"
< > <= >= Smaller, greater {item's Budget} > 1000

Parentheses decide what is calculated first: ({item's Price} - {item's Discount}) * 1.22.

Conditions

Function Gives Example
IF(condition, if true, [if false]) One value or the other IF({item's Budget} > 1000, "Large", "Small")
IFS(condition1, value1, condition2, value2, …) The value of the first true condition IFS({item's Score} >= 90, "A", {item's Score} >= 70, "B", TRUE, "C")
SWITCH(value, case1, result1, case2, result2, …, [otherwise]) The result of the matching case SWITCH({item's Priority}, "High", 1, "Medium", 2, 3)
CHOOSE_BY(value, limit1, result1, limit2, result2, …, [otherwise]) coming soon A result by bands of a number: below the first limit the first result, below the second the second, otherwise the last one CHOOSE_BY({item's Score}, 50, "Low", 80, "Medium", "High")
FIRST_FILLED(value1, value2, …) coming soon The first value that isn’t empty (an empty column, a text of spaces); 0 and FALSE count FIRST_FILLED({item's Mobile}, {item's Phone}, "n/a")
CHOOSE(n, value1, value2, …) The n-th value CHOOSE(WEEKDAY(TODAY()), "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
AND(…), OR(…), XOR(…), NOT(…) Combine conditions IF(AND({item's Paid}, {item's Shipped}), "Closed", "Open")
ISBLANK, ISNUMBER, ISTEXT, ISERROR TRUE or FALSE IF(ISBLANK({item's Date}), "No date", {item's Date})
NA() The Not found error (#N/A), on purpose: a value to skip later with IFNA IF({item's Code} = "", NA(), {item's Code})

A Checkbox column is TRUE when checked, so IF({item's Approved}, …) works directly.

Writing nothing. A formula whose result is the text DO-NOTHING leaves the target column as it is:

=IF(ISBLANK({item's Email}), "DO-NOTHING", LOWER({item's Email}))

Errors

When a calculation can’t be done, the result is an error. General Caster doesn’t write it into the column: monday notifies you with the reason and a link to the formula debugger, which shows the value of every part of the formula.

The debugger and the notifications call each error by its name; the code next to it is the one spreadsheets use, and the one IFNA and ISERROR look at.

Error Code Usually means
Wrong value #VALUE! A value of the wrong kind: text where a number or a date is needed
Division by zero #DIV/0! A division by zero, often by an empty column
Not found #N/A Something looked for wasn’t found
Unknown name #NAME? A function name is mistyped, or doesn’t exist in this recipe
Invalid number #NUM! A number out of range, such as the square root of -1
Can’t calculate #CALC! A list too large, or empty where it can’t be

IFERROR(value, alternative) gives the alternative instead of any error, IFNA(value, alternative) only instead of Not found (#N/A):

=IFERROR({item's Done} / {item's Total}, 0)

Errors in plain words coming soon

In the new recipes and automation blocks (coming soon), the notification says what went wrong and where, with the values involved, instead of the bare code:

Formula The notification says
{item's Price} / {item's Quantity} with Quantity 0 120 can’t be divided by zero. Check the divisor first, e.g. IF(divisor = 0, 0, …) or IFERROR(…, 0).
{item's Price} * 2 with Price 12 EUR “12 EUR” is text, so it can’t be multiplied. Take the number out of it first…
DATE.ADD({item's Text}, 2, "days") with Text someday DATE.ADD: “someday” is not a date General Caster can read…
UPPPER({item's Name}) There is no function called UPPPER. Did you mean UPPER?

Inside the formula the error keeps its code (#VALUE!, #DIV/0!…), so IFERROR, IFNA and ISERROR work as before.

Your own message. ERROR("message") stops the formula with an error that says what you wrote. Nothing is written into the column, monday notifies the message, and the automation stays on for the next changes:

=IF({item's Quantity} > 100, ERROR("Over 100 pieces: ask the warehouse"), {item's Quantity} * {item's Price})

Reading the message. ERROR.MESSAGE(value) gives the message of an error in words, or an empty text when the value is not an error. Useful to write the reason into a Text column instead of stopping:

=IFERROR({item's Total} / {item's Days}, ERROR.MESSAGE({item's Total} / {item's Days}))

In the current recipes the notification shows the code, as it always did.

Text and numbers

Columns reach the formula as text, and General Caster turns them into numbers or dates where a calculation needs one: {item's Price} * 2 works with a Numbers column. When a number is inside a longer text, take it out first (see Texts) and convert it with VALUE.

The result is written as the target column expects it: a number into a Numbers column, YYYY-MM-DD into a Date column, an existing label into a Status column. See A column did not accept the value.

Step by step

In the new recipes (coming soon), a value can be followed by a dot and a function. The value becomes the function’s first argument, so a formula reads left to right instead of inside out:

inside out:    =UPPER(LEFT(TRIM({item's Name}), 1))
step by step:  ={item's Name}.TRIM().LEFT(1).UPPER()

Both are the same formula, and the two ways can be mixed. The pages on texts, dates and lists show both.

The current recipes and the next version

The current recipes calculate exactly as they always did, and will keep doing so. The functions marked coming soon in this guide, the step-by-step style and lists as values come with the next version of General Caster, in its new recipes and automation blocks. To use them in an existing automation, add the recipe again once the new version is out.

Still stuck?

Check your formula step by step, or ask us: we usually answer within one business day.