Filter rows by rules (formula engine)

Formula engine: evaluate a filter of rules and groups (and, or, not; greater than, between, contains, any of, all of, none of, is empty, on a day) over a list of rows and keep the rows it matches

Give the rule tree ({kind: "group", combinator: "and" | "or", negate, rules: [...]}, each rule {kind: "rule", field, operator, params}), the fields it may name ({id, kind}: number, duration, text, tags, choice, date) and the rows (plain objects with those fields). Returns matches: the indices of the rows the rules hold for, kept, and any rule left out because it is unfinished. An unknown value never matches a comparison.

What it asks for

  • tree (Needed, details):
  • fields (Needed, list):
  • rows (Needed, list):

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to formula engine: evaluate a filter of rules and groups (and, or, not; greater than, between, contains, any of, all of, none of, is empty, on a day) over a list of rows and keep the rows it matches”

What your AI calls: run_tool {"tool_id":"tool:filter-rows-by-rules"}