Skip to main content

Frappe Formulas — Quick Reference

FunctionSyntaxReturns
FRAPPE_GETFRAPPE_GET(doctype, name, field)Single field value
FRAPPE_SUMFRAPPE_SUM(doctype, field, [f1, v1, ...])Sum of field
FRAPPE_COUNTFRAPPE_COUNT(doctype, [f1, v1, ...])Document count
FRAPPE_AVGFRAPPE_AVG(doctype, field, [f1, v1, ...])Average of field
GL_BALANCEGL_BALANCE(account, [company], [date])GL balance
STOCK_QTYSTOCK_QTY(item, [warehouse])Current stock qty
ITEM_PRICEITEM_PRICE(item, price_list, [uom], [date])Price list price

Filter Syntax for FRAPPE_SUM / COUNT / AVG​

Filters are passed as field/value pairs after the required arguments:

=FRAPPE_COUNT("Sales Invoice", "docstatus", 1, "customer", "Acme Corp")

Supported operators: exact match only (value equality). For range/comparison filters, use FRAPPE_GET in combination with SUMIF on the fetched data.

Full Documentation​

See Frappe-Native Formulas for complete syntax, examples, and performance notes.