Medialyst
GuidesFormulas + runWhenFormulas

Formulas

Formulas let you compute values from existing columns for 0 credits.

Use them to extract fields, clean text, score journalists, and drive routing logic before expensive AI or enrichment runs. More filtering here means more credits spent on the right people.

AI Formula Generator

Don't write formulas by hand. We built a formula generator that writes them for you.

  1. Click + Add ColumnFormula
  2. Click Use AI to generate formula
  3. Describe what you want in plain English (e.g., "check if email exists and match score is above 7")
  4. Review the generated formula and preview
  5. Click Apply when it looks right

The generator handles syntax, function names, and column references automatically. Use this for most formulas—it's faster and less error-prone than writing by hand.

When to write manually

Manual formulas are useful for quick tweaks or when you already know the syntax. For anything complex, let the generator handle it.

Syntax

Column references

Reference columns using double curly braces:

{{Email}}
{{Match Score}}
{{Journalist Profile}}

Nested properties

Access nested fields in JSON columns:

{{Journalist Profile}}.email
{{Article}}.title

Operators

TypeOperatorsExample
Arithmetic+, -, *, /, %, ^{{Base Score}} * 1.2
Comparison>, >=, <, <=, =, !={{Match Score}} >= 7
Logical&&, ||, !, ??{{Email}} != null && {{Email}} != ""
Conditional? :{{Match Score}} > 7 ? "Priority" : "Standard"

Function Reference

String functions

FunctionDescriptionExample
CONCAT(...values)Join valuesCONCAT("Hello", " ", "World")"Hello World"
UPPER(text)Uppercase textUPPER("hello")"HELLO"
LOWER(text)Lowercase textLOWER("HELLO")"hello"
TRIM(text)Remove leading and trailing whitespaceTRIM(" hi ")"hi"
LENGTH(text)String lengthLENGTH("hello")5
LEFT(text, n)First n charactersLEFT("hello", 2)"he"
RIGHT(text, n)Last n charactersRIGHT("hello", 2)"lo"
MID(text, start, len)Substring using 1-based indexMID("hello", 2, 3)"ell"
SUBSTRING(text, start, end)Substring using 0-based indexesSUBSTRING("hello", 1, 4)"ell"
REPLACE(text, find, repl)Replace first matchREPLACE("hello", "l", "L")"heLlo"
SUBSTITUTE(text, find, repl)Replace all matchesSUBSTITUTE("hello", "l", "L")"heLLo"
SPLIT(text, delim)Split string into arraySPLIT("a,b,c", ",")["a","b","c"]
CONTAINS(text, search)Text contains substringCONTAINS("hello", "ell")true
STARTSWITH(text, search)Text starts with substringSTARTSWITH("hello", "he")true
ENDSWITH(text, search)Text ends with substringENDSWITH("hello", "lo")true
REGEX_MATCH(text, pattern)Regex match testREGEX_MATCH("abc123", "[0-9]+")true
REGEX_REPLACE(text, pattern, repl)Regex replaceREGEX_REPLACE("a1b2", "[0-9]", "X")"aXbX"

Array functions

FunctionDescriptionExample
JOIN(array, sep)Join array with separatorJOIN(["a","b"], "-")"a-b"
AT(array, index)Get item by indexAT(["a","b","c"], 1)"b"
LENGTH(array)Array lengthLENGTH([1,2,3])3
UNIQUE(array)Remove duplicate valuesUNIQUE([1,1,2])[1,2]
FLATTEN(array)Flatten nested arraysFLATTEN([[1],[2,3]])[1,2,3]
TAKE(array, n)Keep first n itemsTAKE([1,2,3,4], 2)[1,2]
DROP(array, n)Remove first n itemsDROP([1,2,3,4], 2)[3,4]
SLICE(array, start, end)Slice by index rangeSLICE([1,2,3,4], 1, 3)[2,3]
INCLUDES(array, value)Array contains valueINCLUDES([1,2,3], 2)true
INDEX_OF(array, value)Index of valueINDEX_OF(["a","b"], "b")1

JSON/object functions

FunctionDescriptionExample
GET(obj, path, default)Read nested propertyGET({{Journalist Profile}}, "email", "")
SET(obj, path, value)Return object with updated pathSET({{Journalist Profile}}, "priority", "A")
MERGE(base, updates)Deep merge objectsMERGE({a:1}, {b:2}){a:1,b:2}
PICK(obj, keys)Keep selected keysPICK({a:1,b:2}, ["a"]){a:1}
OMIT(obj, keys)Remove selected keysOMIT({a:1,b:2}, ["a"]){b:2}
KEYS(obj)Get key listKEYS({a:1,b:2})["a","b"]
VALUES(obj)Get value listVALUES({a:1,b:2})[1,2]
HAS(obj, key)Check key existsHAS({a:1}, "a")true
STRINGIFY(value, space)Convert to JSON stringSTRINGIFY({a:1})"{\"a\":1}"
PARSE(json)Parse JSON stringPARSE("{\"a\":1}"){a:1}

Numeric functions

FunctionDescriptionExample
ROUND(n, decimals)Round to decimal placesROUND(3.456, 2)3.46
ABS(n)Absolute valueABS(-5)5
TO_NUMBER(value)Convert to numberTO_NUMBER("123")123
MIN(...values)Lowest valueMIN(1, 5, 3)1
MAX(...values)Highest valueMAX(1, 5, 3)5
SUM(...values)Sum valuesSUM(1, 2, 3)6
AVERAGE(...values)Mean averageAVERAGE(1, 2, 3)2
FORMAT_CURRENCY(n, curr, locale)Format currency stringFORMAT_CURRENCY(29.99, "USD")"$29.99"
FORMAT_PERCENT(n, dec, locale)Format percent stringFORMAT_PERCENT(0.15, 0)"15%"

Logical functions

FunctionDescriptionExample
IF(cond, ifTrue, ifFalse)Conditional branchIF({{Match Score}} > 7, "High", "Low")
AND(...values)True when all values are truthyAND(true, true)true
OR(...values)True when any value is truthyOR(false, true)true
NOT(value)Logical negationNOT(true)false
COALESCE(...values)First non-null valueCOALESCE(null, "", "fallback")""
ISNULL(value)Check null or undefinedISNULL(null)true
ISBLANK(value)Check empty, null, or undefinedISBLANK("")true
ISNUMBER(value)Check numeric typeISNUMBER(123)true
ISTEXT(value)Check text/string typeISTEXT("hello")true

Fewer credits, better targeting

Use formulas to compute triage columns like "Email Exists" or "Priority Tier", then reference those in runWhen conditions. This way, AI runs only on journalists who actually qualify.