AccountedPro - Filters, conditions and drill-down
The same condition builder appears wherever the app asks "which records?" — a tab, a card, a colour rule, whether an element is visible, which related records to count, and which rows a button appears on. Learning it once covers all of them.
Conditions and groups
A condition is field → operator → value.
- + condition adds another. Inside a group they combine with AND or OR — click the operator to flip it.
- + group nests a bracket, so (A or B) and C is expressible. Groups nest as deep as needed.
- NOT inverts a single condition, or a whole group from its header.
- The ⋮⋮ handle drags a condition into or out of a group.
- × removes one.
The box underneath is a live preview: how many records match, five example names, what the condition reads as in words, and what it costs. It updates as you type.
The operators
| Operator | Notes |
|---|---|
equals, not equals |
Exact match. |
greater than, greater or equal, less than, less or equal |
Numbers and dates. |
between |
Two values, comma separated. |
in, not in |
A list, comma separated. |
contains, does not contain |
Text search. |
is set, is not set |
No value box — asks whether the field has anything in it. |
in the period |
Frappe's own relative period: last week, this month, last quarter, this year… |
Standard fields
The field list includes the ones that are not in the DocType's own field list but are on every record: ID (name), Document Status (docstatus — Draft, Submitted, Cancelled), Created By (owner), Modified By, Created On (creation), Last Updated On (modified), Row # (idx). Filtering by submitted state is docstatus equals 1.
Drilling into a linked document
A Link field carries a › chevron in the field list. Click it to walk into that document and filter on its fields — "orders whose price list is in Canadian dollars" rather than "orders whose price list is named X".
price_list › currency equals CAD
The dropdown to the left of the field does the same job and shows the chain you have built (↳ Price List → Price List). Both are two doors into the same room; use whichever you reach for.
What it costs. A flat AND of ordinary comparisons compiles into the query itself and costs nothing extra — the preview says no extra lookups. OR, NOT and hops cannot be expressed that way, so they are resolved into a list of matching names first; the preview then says 1 extra lookup, 2 extra lookups, and so on. One lookup per level for the whole page, never per row.
Depth is capped at ten links. Past that it is a report, not a list.
Values that are not literals
A saved layout is read by everyone, tomorrow as well as today, so some values have to be words rather than facts.
The person reading
| Write | Means |
|---|---|
@me |
Whoever is looking at the list |
On a field that holds a person — Created By, Modified By, any Link to User — a dropdown appears beside the value box offering the logged-in user, which stores @me for you.
Also understood, because they are what people type: me, current user, logged in user, {{ user }}, {{ session.user }}, {{ frappe.session.user }}. A real address like someone@example.com is never mistaken for the token.
A moment in time
On a date field a dropdown offers relative values, so a saved filter does not go stale overnight:
| Write | Means |
|---|---|
today, now |
The moment it is read |
yesterday, tomorrow |
± one day |
start of week, end of week |
The current week |
start of month, end of month |
The current month |
start of year, end of year |
The current year |
-7d, +2w, -3m, +1y |
Days, weeks, months, years from today |
"Everything before today" is date less than today, and it still means that next week. These resolve on the server when the query runs, and in the browser for colour and visibility rules, so both agree.
Filtering on a child table
Name the child DocType with the field:
Sales Order Item.item_code
Frappe joins the child table when the filter names it. The field alone would be looked for on the parent, which does not have it. Counts and badges follow the same rule and count each parent once, however many child rows match.
Where conditions appear
| Place | Question it answers |
|---|---|
| Tab | Which records belong to this preset? |
| Card | What is being counted or summed? |
| Colour rule | When should this element look like this? |
| Show this only when… | Should this element, column, block or tab appear at all? |
| Related block | Which records from the other DocType count? |
| Button | On which rows does this button appear? |
| Layout filter | What is this whole list scoped to, for everyone? |
The last one is worth knowing: a layout can carry a base condition that every reader is inside, whatever else they filter by.
Conditions that read what is on screen
A colour rule can test the value shown here rather than a stored field — useful when the element shows a template or a computed value. Those are evaluated in the browser as the row is drawn, so the preview says there is no count to show: the value does not exist until the row exists.