Skip to content

Worked examples

Each example below is a test of the Formula language: the formula, the columns and rows it starts from, and exactly what it produces. When the language changes, these examples run again, so what you read here is what a formula does today.

Example Shows
date-tour, number-tour, text-functions-tour Date, number, and text functions on real values
normalise-drop-raise-group-aggregate A whole step: normalise, filter, raise, group, and aggregate
filter-vs-dropRow, filter-vs-dropRow-equivalent The two ways to remove rows
do-raise-and-drop, raise-with-field-and-key, each-check-every-leg Exceptions, keys, and per-item checks
groupBy-then-copy-key, highest-price-context Grouping helpers and context
inputs-enrich A lookup in another wire’s table
insertRow-two-legs, splitRows-one-per-tag Generating rows
spreadProps-price-fields One level of an object as columns
sortBy-desc-with-empties Sorting with empty values
style-lineage-trade-consideration A data style following a computed value
view-… View formulas: conditional formatting, me(), and option colours

Each example is a formula, its input, and the exact output the interpreter produces.

date-tour

/* Dates are UTC and written as ISO-8601. now() and today() read the run's fixed
   clock (input "now": 2026-10-25T12:00Z). An empty date passes through every
   date function as empty. dateBetween truncates toward zero. The input field
   "when" is never written, so its cell leaves exactly as it arrived. */

setProp("next_month", dateAdd(prop("when"), 1, "months"))
setProp("minus_week", prop("when").dateSubtract(1, "weeks"))
setProp("days_until_now", dateBetween(now(), prop("when"), "days"))
setProp("years_to_2030", dateBetween(parseDate("2030-01-01"), now(), "years"))
setProp("pretty", formatDate(prop("when"), "MMMM D, Y"))
setProp("us", prop("when").formatDate("MM/DD/YYYY"))
setProp("clock", formatDate(prop("when"), "h:mm A"))
setProp("y", year(prop("when")))
setProp("m", month(prop("when")))
setProp("d", date(prop("when")))
setProp("weekday", day(prop("when")))
setProp("wk", week(prop("when")))
setProp("hh", hour(prop("when")))
setProp("mi", minute(prop("when")))
setProp("stamp", timestamp(prop("when")))
setProp("today_iso", today())
setProp("parsed", parseDate("2022-01-01"))
setProp("from_stamp", fromTimestamp(1689024900000))

Input fields: when: date, label: text.

Clock: now() is 2026-10-25T12:00:00Z.

Input rows:

[
  {"when":"2026-01-31","label":"month end"},
  {"when":"2025-12-24T18:30:00Z","label":"evening"},
  {"when":null,"label":"no date"}
]

Output rows:

[
  {"when":"2026-01-31","label":"month end","next_month":"2026-02-28T00:00:00.000Z","minus_week":"2026-01-24T00:00:00.000Z","days_until_now":267,"years_to_2030":3,"pretty":"January 31, 2026","us":"01/31/2026","clock":"12:00 AM","y":2026,"m":1,"d":31,"weekday":6,"wk":5,"hh":0,"mi":0,"stamp":1769817600000,"today_iso":"2026-10-25T00:00:00.000Z","parsed":"2022-01-01T00:00:00.000Z","from_stamp":"2023-07-10T21:35:00.000Z"},
  {"when":"2025-12-24T18:30:00Z","label":"evening","next_month":"2026-01-24T18:30:00.000Z","minus_week":"2025-12-17T18:30:00.000Z","days_until_now":304,"years_to_2030":3,"pretty":"December 24, 2025","us":"12/24/2025","clock":"6:30 PM","y":2025,"m":12,"d":24,"weekday":3,"wk":52,"hh":18,"mi":30,"stamp":1766601000000,"today_iso":"2026-10-25T00:00:00.000Z","parsed":"2022-01-01T00:00:00.000Z","from_stamp":"2023-07-10T21:35:00.000Z"},
  {"when":null,"label":"no date","next_month":null,"minus_week":null,"days_until_now":null,"years_to_2030":3,"pretty":null,"us":null,"clock":null,"y":null,"m":null,"d":null,"weekday":null,"wk":null,"hh":null,"mi":null,"stamp":null,"today_iso":"2026-10-25T00:00:00.000Z","parsed":"2022-01-01T00:00:00.000Z","from_stamp":"2023-07-10T21:35:00.000Z"}
]

Exceptions raised:

[]

Final context:

{}

do-raise-and-drop

/* do() runs its statements left to right on the same row: raise the
   exception, then drop the row. The exception outlives the dropped row. */

if(
  prop("owner").empty(),
  do(
    raiseException("owner")
      .setProp("message", "Owner is missing")
      .setProp("severityLevel", 3),
    dropRow()
  )
)

Input fields: owner: text, ISIN: text, price: number.

Input rows:

[
  {"owner":"zoltan","ISIN":"A","price":3},
  {"owner":"","ISIN":"B","price":2},
  {"owner":"ann","ISIN":"C","price":4}
]

Output rows:

[
  {"owner":"zoltan","ISIN":"A","price":3},
  {"owner":"ann","ISIN":"C","price":4}
]

Exceptions raised:

[
  {"inputRowIndex":1,"field":"owner","message":"Owner is missing","severityLevel":3}
]

Final context:

{}

each-check-every-leg

# One ticket per leg with no ISIN, on the trade row that holds the legs. The
# key is the trade and the leg's position, so every leg keeps its own ticket.
each(
  prop("legs"),
  if(
    empty(current.prop("ISIN")),
    raiseException("legs", concat(prop("tradeId"), ":", format(index)))
      .setProp("message", "Leg has no ISIN")
      .setProp("severity", 3)
  )
)

# The legs stay as they arrived: an object is read, never written back.
setProp("legCount", prop("legs").count())

setProp("notional", prop("legs").map(current.prop("notional")).sum())

Input fields: tradeId: text, legs: list<object>.

Input rows:

[
  {"tradeId":"T-1","legs":[{"ISIN":"SOMEISIN","notional":1000},{"ISIN":"","notional":250}]},
  {"tradeId":"T-2","legs":[{"ISIN":"OTHERISIN","notional":400}]}
]

Output rows:

[
  {"tradeId":"T-1","legs":[{"ISIN":"SOMEISIN","notional":1000},{"ISIN":"","notional":250}],"legCount":2,"notional":1250},
  {"tradeId":"T-2","legs":[{"ISIN":"OTHERISIN","notional":400}],"legCount":1,"notional":400}
]

Exceptions raised:

[
  {"inputRowIndex":0,"field":"legs","key":"T-1:1","message":"Leg has no ISIN","severityLevel":3}
]

filter-vs-dropRow

/* filter(condition) keeps the rows where the condition is true (Notion polarity).
   filter-vs-dropRow-equivalent writes the same row set with if(..., dropRow()). */

filter(prop("expired") != 1)

Input fields: ISIN: text, expired: number, price: number.

Input rows:

[
  {"ISIN":"A","expired":0,"price":3},
  {"ISIN":"B","expired":1,"price":6},
  {"ISIN":"C","expired":0,"price":10},
  {"ISIN":"D","expired":1,"price":2},
  {"ISIN":"E","expired":0,"price":4}
]

Output rows:

[
  {"ISIN":"A","expired":0,"price":3},
  {"ISIN":"C","expired":0,"price":10},
  {"ISIN":"E","expired":0,"price":4}
]

Exceptions raised:

[]

Final context:

{}

filter-vs-dropRow-equivalent

/* The same row set as filter-vs-dropRow: drop where the condition is true. */

if(prop("expired").equal(1), dropRow())

Input fields: ISIN: text, expired: number, price: number.

Input rows:

[
  {"ISIN":"A","expired":0,"price":3},
  {"ISIN":"B","expired":1,"price":6},
  {"ISIN":"C","expired":0,"price":10},
  {"ISIN":"D","expired":1,"price":2},
  {"ISIN":"E","expired":0,"price":4}
]

Output rows:

[
  {"ISIN":"A","expired":0,"price":3},
  {"ISIN":"C","expired":0,"price":10},
  {"ISIN":"E","expired":0,"price":4}
]

Exceptions raised:

[]

Final context:

{}

groupBy-then-copy-key

# The group helpers are formula-local: copy __groupKey under another name
# before the output drops it. Comments run from # to the end of the line.

groupBy(prop("owner"))

setProp("groupKey", prop("__groupKey")) # a list even with one key field
setProp("members", prop("__groupIndices").count())

# Aggregate the member lists back to one value per group.
setProp("owner", prop("owner").first())
setProp("price", prop("price").sum())

Input fields: owner: text, price: number.

Input rows:

[
  {"owner":"zoltan","price":3},
  {"owner":"ann","price":10},
  {"owner":"zoltan","price":6},
  {"owner":"ann","price":4},
  {"owner":"","price":2}
]

Output rows:

[
  {"owner":"zoltan","price":9,"groupKey":["zoltan"],"members":2},
  {"owner":"ann","price":14,"groupKey":["ann"],"members":2},
  {"owner":"","price":2,"groupKey":[""],"members":1}
]

Exceptions raised:

[]

Final context:

{}

highest-price-context

/* Highest price via context: the spec's second Example program.
   The first write types the key; the scan finishes before the flag is set. */

context().setProp("highestPrice", 0)

if(
  prop("price") > context().prop("highestPrice"),
  context().setProp("highestPrice", prop("price"))
)

setProp("isHighest", prop("price") == context().prop("highestPrice"))

Input fields: owner: text, price: number.

Input rows:

[
  {"owner":"zoltan","price":3},
  {"owner":"zoltan","price":6},
  {"owner":"ann","price":10},
  {"owner":"","price":2},
  {"owner":"ann","price":4}
]

Output rows:

[
  {"owner":"zoltan","price":3,"isHighest":false},
  {"owner":"zoltan","price":6,"isHighest":false},
  {"owner":"ann","price":10,"isHighest":true},
  {"owner":"","price":2,"isHighest":false},
  {"owner":"ann","price":4,"isHighest":false}
]

Exceptions raised:

[]

Final context:

{"highestPrice":10}

inputs-enrich

/* Enrich from a second wire: first match in table order, empty on a miss,
   an explicit miss value with let, every match with findAll, and rows(). */

setProp("ibor_value", inputs().prop("ibor_valuations").find("ISIN", prop("ISIN")).prop("value"))

setProp(
  "ibor_or_minus_one",
  let(
    hit,
    inputs().prop("ibor_valuations").find("ISIN", prop("ISIN")),
    if(empty(hit), -1, hit.prop("value"))
  )
)

setProp("hits", inputs().prop("ibor_valuations").findAll("ISIN", prop("ISIN")).count())

setProp("table_size", inputs().prop("ibor_valuations").rows().count())

Input fields: ISIN: text, price: number.

Table ibor_valuations (ISIN: text, value: number):

[
  {"ISIN":"SOMEISIN","value":1.5},
  {"ISIN":"X","value":7},
  {"ISIN":"X","value":8}
]

Input rows:

[
  {"ISIN":"SOMEISIN","price":3},
  {"ISIN":"Y","price":2},
  {"ISIN":"X","price":4}
]

Output rows:

[
  {"ISIN":"SOMEISIN","price":3,"ibor_value":1.5,"ibor_or_minus_one":1.5,"hits":1,"table_size":3},
  {"ISIN":"Y","price":2,"ibor_value":null,"ibor_or_minus_one":-1,"hits":0,"table_size":3},
  {"ISIN":"X","price":4,"ibor_value":7,"ibor_or_minus_one":7,"hits":2,"table_size":3}
]

Exceptions raised:

[]

Final context:

{}

insertRow-two-legs

/* Replace every row by two legs. insertRow() copies the row as it stands at
   that point and the chained .setProp calls set fields on the copy, reading
   the current row; dropRow() then removes the original. */

do(
  insertRow().setProp("leg", "A"),
  insertRow().setProp("leg", "B").setProp("qty", 0 - prop("qty")),
  dropRow()
)

# Later statements see the inserted rows.
setProp("long", prop("qty") > 0)

Input fields: trade: text, qty: number.

Input rows:

[
  {"trade":"T1","qty":100},
  {"trade":"T2","qty":40}
]

Output rows:

[
  {"trade":"T1","qty":100,"leg":"A","long":true},
  {"trade":"T1","qty":-100,"leg":"B","long":false},
  {"trade":"T2","qty":40,"leg":"A","long":true},
  {"trade":"T2","qty":-40,"leg":"B","long":false}
]

Final context:

{}

normalise-drop-raise-group-aggregate

/* Normalise, drop, raise, group, aggregate: the spec's first Example program. */

if(
  prop("Created by").equal("buy"),
  setProp("Created by", "BUY"),
  setProp("Created by", "SELL")
)

filter(prop("expired") != 1)

if(
  prop("owner").empty(),
  raiseException()
    .setProp("message", "Owner is missing")
    .setProp("severityLevel", 3)
)

groupBy(prop("owner"), prop("ISIN"))

setProp("owner", prop("owner").first())
setProp("ISIN", prop("ISIN").first())
setProp("price", prop("price").sum())

Input fields: Created by: text, expired: number, owner: text, ISIN: text, price: number.

Input rows:

[
  {"Created by":"buy","expired":0,"owner":"zoltan","ISIN":"SOMEISIN","price":3},
  {"Created by":"sell","expired":0,"owner":"zoltan","ISIN":"SOMEISIN","price":6},
  {"Created by":"buy","expired":1,"owner":"ann","ISIN":"X","price":10},
  {"Created by":"sell","expired":0,"owner":"","ISIN":"Y","price":2},
  {"Created by":"buy","expired":0,"owner":"ann","ISIN":"X","price":4}
]

Output rows:

[
  {"Created by":["BUY","SELL"],"expired":[0,0],"owner":"zoltan","ISIN":"SOMEISIN","price":9},
  {"Created by":["SELL"],"expired":[0],"owner":"","ISIN":"Y","price":2},
  {"Created by":["BUY"],"expired":[0],"owner":"ann","ISIN":"X","price":4}
]

Exceptions raised:

[
  {"inputRowIndex":3,"message":"Owner is missing","severityLevel":3}
]

Final context:

{}

number-tour

/* Numbers are Decimal.js while they are computed: round() is half away from
   zero (2.5 → 3, -2.5 → -3, 1.005 → 1.01 at two places), mod keeps the sign of
   the first operand, 5 / 10 is exactly 0.5 and 0.1 + 0.2 is exactly 0.3.
   Cells are written as JavaScript numbers. */

setProp("rounded", round(prop("a")))
setProp("rounded2", round(prop("a"), 2))
setProp("half_up", round(0.5))
setProp("half_down", round(-0.5))
setProp("hundreds", round(1234, -2))
setProp("modulo", mod(prop("a"), prop("b")))
setProp("remainder", 7 % prop("b"))
setProp("half", 5 / 10)
setProp("ratio", prop("a") / prop("b"))
setProp("cents", 0.1 + 0.2)
setProp("power", 2 ^ 2 ^ 3)
setProp("sum3", sum(prop("a"), prop("b"), 0.1))
setProp("min_ab", min(prop("a"), prop("b")))
setProp("max_ab", max(prop("a"), prop("b")))
setProp("mean_ab", mean(prop("a"), prop("b")))
setProp("median4", median([1, 2, 3], 4))
setProp("abs_a", abs(prop("a")))
setProp("sign_a", sign(prop("a")))
setProp("ceil_a", ceil(prop("a")))
setProp("floor_a", floor(prop("a")))
setProp("usd", formatNumber(prop("a"), "usd"))
setProp("commas", formatNumber(1234567.891))
setProp("parsed", toNumber("2") + 1)

Input fields: a: number, b: number.

Input rows:

[
  {"a":2.5,"b":3},
  {"a":-2.5,"b":-3},
  {"a":1.005,"b":10}
]

Output rows:

[
  {"a":2.5,"b":3,"rounded":3,"rounded2":2.5,"half_up":1,"half_down":-1,"hundreds":1200,"modulo":2.5,"remainder":1,"half":0.5,"ratio":0.8333333333333334,"cents":0.3,"power":256,"sum3":5.6,"min_ab":2.5,"max_ab":3,"mean_ab":2.75,"median4":2.5,"abs_a":2.5,"sign_a":1,"ceil_a":3,"floor_a":2,"usd":"$2.50","commas":"1,234,567.891","parsed":3},
  {"a":-2.5,"b":-3,"rounded":-3,"rounded2":-2.5,"half_up":1,"half_down":-1,"hundreds":1200,"modulo":-2.5,"remainder":1,"half":0.5,"ratio":0.8333333333333334,"cents":0.3,"power":256,"sum3":-5.4,"min_ab":-3,"max_ab":-2.5,"mean_ab":-2.75,"median4":2.5,"abs_a":2.5,"sign_a":-1,"ceil_a":-2,"floor_a":-3,"usd":"-$2.50","commas":"1,234,567.891","parsed":3},
  {"a":1.005,"b":10,"rounded":1,"rounded2":1.01,"half_up":1,"half_down":-1,"hundreds":1200,"modulo":1.005,"remainder":7,"half":0.5,"ratio":0.1005,"cents":0.3,"power":256,"sum3":11.105,"min_ab":1.005,"max_ab":10,"mean_ab":5.5025,"median4":2.5,"abs_a":1.005,"sign_a":1,"ceil_a":2,"floor_a":1,"usd":"$1.01","commas":"1,234,567.891","parsed":3}
]

Exceptions raised:

[]

Final context:

{}

raise-with-field-and-key

/* A keyed exception pinned to a column: the ticket follows the key across runs.
   severity is the same exception field as severityLevel. Extra Exception
   Management fields (status, assignee, custom properties) use the same
   setProp. Every row is still emitted. */

if(
  prop("price") < 0,
  raiseException("price", concat(prop("owner"), prop("ISIN")))
    .setProp("message", "Negative price")
    .setProp("severity", 4)
    .setProp("type", "pricing")
    .setProp("status", "investigating")
)

Input fields: owner: text, ISIN: text, price: number.

Input rows:

[
  {"owner":"zoltan","ISIN":"SOMEISIN","price":-1},
  {"owner":"ann","ISIN":"X","price":4},
  {"owner":"ann","ISIN":"Y","price":-2.5}
]

Output rows:

[
  {"owner":"zoltan","ISIN":"SOMEISIN","price":-1},
  {"owner":"ann","ISIN":"X","price":4},
  {"owner":"ann","ISIN":"Y","price":-2.5}
]

Exceptions raised:

[
  {"inputRowIndex":0,"field":"price","key":"zoltanSOMEISIN","message":"Negative price","severityLevel":4,"type":"pricing","extraFields":{"status":"investigating"}},
  {"inputRowIndex":2,"field":"price","key":"annY","message":"Negative price","severityLevel":4,"type":"pricing","extraFields":{"status":"investigating"}}
]

Final context:

{}

sortBy-desc-with-empties

/* Stable sort: owner ascending, then price descending; empties sort last
   in both directions, and equal keys keep their input order (ids 1 before 4). */

sortBy(prop("owner"), desc(prop("price")))

Input fields: id: number, owner: text, price: number.

Input rows:

[
  {"id":1,"owner":"b","price":1},
  {"id":2,"owner":"a","price":null},
  {"id":3,"owner":"a","price":5},
  {"id":4,"owner":"b","price":1},
  {"id":5,"owner":"a","price":2}
]

Output rows:

[
  {"id":3,"owner":"a","price":5},
  {"id":5,"owner":"a","price":2},
  {"id":2,"owner":"a","price":null},
  {"id":1,"owner":"b","price":1},
  {"id":4,"owner":"b","price":1}
]

Exceptions raised:

[]

Final context:

{}

splitRows-one-per-tag

# One row per tag: splitRows() emits a copy of the row per list item with
# the item under the new field; a row whose list is empty is dropped.

splitRows(prop("tags"), "tag")

setProp("tag", prop("tag").upper())

Input fields: name: text, tags: list<text>.

Input rows:

[
  {"name":"a","tags":["x","y"]},
  {"name":"b","tags":[]},
  {"name":"c","tags":["z"]}
]

Output rows:

[
  {"name":"a","tags":["x","y"],"tag":"X"},
  {"name":"a","tags":["x","y"],"tag":"Y"},
  {"name":"c","tags":["z"],"tag":"Z"}
]

Final context:

{}

spreadProps-price-fields

# One level of an object as columns: spreadProps() writes the fields of
# price as value and ccy, and removes the price column because the
# argument is a plain column read.

spreadProps(prop("price"))

Input fields: id: text, price: object.

Input rows:

[
  {"id":"p1","price":{"value":101.2,"ccy":"EUR"}},
  {"id":"p2","price":{"value":99.5,"ccy":"USD"}}
]

Output rows:

[
  {"id":"p1","value":101.2,"ccy":"EUR"},
  {"id":"p2","value":99.5,"ccy":"USD"}
]

Final context:

{}

style-lineage-trade-consideration

setStyle("Dirty Price", "background", "rose")

setRowStyle("bold", true)

setProp("Consideration", prop("Dirty Price") * prop("Quantity"))

setProp("Desk", if(prop("Quantity") > 0, "Rates", "Credit"))

setProp("Currency", "GBP")

clearRowStyle("bold")

Input fields: ISIN: text, Dirty Price: number, Quantity: number.

Input rows:

[
  {"ISIN":"GB00B16NNR78","Dirty Price":101.25,"Quantity":500000},
  {"ISIN":"XS1234567890","Dirty Price":98.5,"Quantity":-250000}
]

Output rows:

[
  {"ISIN":"GB00B16NNR78","Dirty Price":101.25,"Quantity":500000,"Consideration":50625000,"Desk":"Rates","Currency":"GBP"},
  {"ISIN":"XS1234567890","Dirty Price":98.5,"Quantity":-250000,"Consideration":-24625000,"Desk":"Credit","Currency":"GBP"}
]

text-functions-tour

/* Text functions: trim, padStart / padEnd (a number is formatted before padding,
   and a number pad becomes its text), regex replaceAll / match / test with
   JavaScript escapes written as "\\d", format, split / join, substring, replace. */

setProp("trimmed", prop("name").trim())
setProp("lowered", prop("name").lower())
setProp("padded", prop("code").padStart(5, 0))
setProp("padded_text", prop("name").trim().padEnd(8, "."))
setProp("pad_len", prop("name").trim().padStart(8, "!".length()))
setProp("digits_removed", replaceAll(concat(prop("name").trim(), " 123"), "\\d", ""))
setProp("matches", match(concat(prop("name").trim(), " 123 and 456"), "\\d+"))
setProp("starts_blank", test(prop("name"), "^\\s"))
setProp("label", format(prop("code")) + "-" + prop("name").trim().upper())
setProp("parts", prop("csv").split(","))
setProp("joined", prop("csv").split(",").reverse().join(" | "))
setProp("first_part", prop("csv").split(",").first())
setProp("has_pear", prop("csv").contains("pear"))
setProp("len", prop("name").length())
setProp("sub", substring(prop("name").trim(), 0, 3))
setProp("first_o", prop("name").trim().replace("o", "0"))
setProp("repeated", "~=".repeat(3))

Input fields: name: text, code: number, csv: text.

Input rows:

[
  {"name":"  Notion  ","code":42,"csv":"apple,pear,orange"},
  {"name":"hi","code":7,"csv":"a"}
]

Output rows:

[
  {"name":"  Notion  ","code":42,"csv":"apple,pear,orange","trimmed":"Notion","lowered":"  notion  ","padded":"00042","padded_text":"Notion..","pad_len":"11Notion","digits_removed":"Notion ","matches":["123","456"],"starts_blank":true,"label":"42-NOTION","parts":["apple","pear","orange"],"joined":"orange | pear | apple","first_part":"apple","has_pear":true,"len":10,"sub":"Not","first_o":"N0tion","repeated":"~=~=~="},
  {"name":"hi","code":7,"csv":"a","trimmed":"hi","lowered":"hi","padded":"00007","padded_text":"hi......","pad_len":"111111hi","digits_removed":"hi ","matches":["123","456"],"starts_blank":false,"label":"7-HI","parts":["a"],"joined":"a","first_part":"a","has_pear":false,"len":2,"sub":"hi","first_o":"hi","repeated":"~=~=~="}
]

Exceptions raised:

[]

Final context:

{}

view-compare-fields

setRowStyle("background", "gray")

if(
  prop("NAV") < prop("Commitment"),
  do(
    setStyle("Fund name", "text_color", "rose"),
    setRowStyle("background", "rose")
  )
)

View formula. Fields: Fund name: text, NAV: number, Commitment: number.

Rows:

[
  {"Fund name":"Alpha","NAV":80,"Commitment":100},
  {"Fund name":"Beta","NAV":120,"Commitment":100},
  {"Fund name":"Gamma","NAV":null,"Commitment":100}
]

Styles and display text per row:

[
  {"cells":{"Fund name":{"text_color":"rose"}},"row":{"background":"rose"},"display":{}},
  {"cells":{},"row":{"background":"gray"},"display":{}},
  {"error":"Numeric operand is empty"}
]

view-display-setprop

if(
  prop("Expiry") < now(),
  setProp("Fund ID", concat(prop("Fund ID"), " <- EXPIRED!"))
)

if(test(prop("Fund ID"), "EXPIRED!$"), setStyle("Fund ID", "strikethrough", true))

setProp("Amount", if(empty(prop("Amount")), "N/A", format(prop("Amount"))))

View formula. Fields: Fund ID: text, Expiry: date, Amount: number.

Clock: now() is 2026-10-29T00:00:00Z.

Rows:

[
  {"Fund ID":"F-14","Expiry":"2026-01-31","Amount":1500},
  {"Fund ID":"F-15","Expiry":"2027-06-30","Amount":null}
]

Styles and display text per row:

[
  {"cells":{"Fund ID":{"strikethrough":true}},"row":{},"display":{"Fund ID":"F-14 <- EXPIRED!","Amount":"1500"}},
  {"cells":{},"row":{},"display":{"Amount":"N/A"}}
]

view-fund-id-suffix

if(test(prop("Fund ID"), "14$"), setStyle("Fund ID", "background", "lime"))

View formula. Fields: Fund ID: text.

Rows:

[
  {"Fund ID":"F-2014"},
  {"Fund ID":"F-2015"},
  {"Fund ID":null}
]

Styles and display text per row:

[
  {"cells":{"Fund ID":{"background":"lime"}},"row":{},"display":{}},
  {"cells":{},"row":{},"display":{}},
  {"cells":{},"row":{},"display":{}}
]

view-me

if(
  prop("Assignee").includes(me()),
  setRowStyle("background", "sky").setRowStyle("bold", true)
)

View formula. Fields: Assignee: list<text>.

Viewer: Ada Lovelace.

Rows:

[
  {"Assignee":["Ada Lovelace","Grace Hopper"]},
  {"Assignee":["Grace Hopper"]}
]

Styles and display text per row:

[
  {"cells":{},"row":{"background":"sky","bold":true},"display":{}},
  {"cells":{},"row":{},"display":{}}
]

view-option-color

setStyle("Status", "dot", optionColor("Status"))

setStyle("Tags", "background", optionColor("Tags"))

View formula. Fields: Status: text, Tags: list<text>.

Option colours:

{"Status":{"Open":"green","Closed":"gray"},"Tags":{"urgent":"red","fx":"sky"}}

Rows:

[
  {"Status":"Open","Tags":["ops","urgent","fx"]},
  {"Status":"Draft","Tags":[]},
  {"Status":null,"Tags":null}
]

Styles and display text per row:

[
  {"cells":{"Status":{"dot":"green"},"Tags":{"background":"red"}},"row":{},"display":{}},
  {"cells":{},"row":{},"display":{}},
  {"cells":{},"row":{},"display":{}}
]

view-reporting-gp-chain

if(
  prop("Reporting GP").contains("Partners"),
  setStyle("Reporting GP", "icon", "thumbsup")
    .setStyle("Reporting GP", "text_color", "indigo")
)

View formula. Fields: Reporting GP: text.

Icons: thumbsup.

Rows:

[
  {"Reporting GP":"Horizon Partners"},
  {"Reporting GP":"Acme Capital"}
]

Styles and display text per row:

[
  {"cells":{"Reporting GP":{"icon":"thumbsup","text_color":"indigo"}},"row":{},"display":{}},
  {"cells":{},"row":{},"display":{}}
]