AccountedPro - Number cards
Cards are the KPI strip above the list — "Open Requests: 42", "This month: $310k". They live in a collapsible strip with a show/hide toggle, and are drag-reorderable in the builder.
Card settings
| Setting | Notes |
|---|---|
| Label | The heading on the tile |
| Note | Smaller text under the number, for context |
| Colour | From the Frappe palette |
| Value is | Where the number comes from — below |
| Show this only when… | Roles and/or a condition |
Where the number comes from
| Value is | Needs | Notes |
|---|---|---|
| A count of records | A condition | How many records match |
| Sum of a field | A field + condition | Totals a numeric field |
| Average of a field | A field + condition | The mean of it |
| A key from the data source | Key (e.g. kpis.open) |
Read straight out of a Server Script response |
The first three are computed on the server in one call for all cards, over the whole filtered set — not the page on screen, and not one query per card.
The fourth is what makes an expensive KPI affordable: a Server Script that is already returning the rows can return its numbers in the same response, and the card just reads them. Dotted keys walk into the response, so kpis.open_requests reads response.kpis.open_requests.
Cards respect the filters
A card's own condition is combined with whatever the reader has filtered by, so the numbers describe what is on screen. Switching tabs changes them too.
Clicking a card
A card can carry a click action that applies filters to the list — so "Overdue: 7" becomes a way to see those seven. The filters are added to the bar as chips, so it is obvious what happened and easy to undo.
Worth knowing
- A card whose condition drills through a link costs an extra lookup, the same as anywhere else — keep the strip cheap, because it is recomputed whenever the filters change.
- Cards are hidden on a narrow screen by default; the strip's toggle brings them back.
- A card with Show this only when… set to a role is not rendered at all for anyone else, so a margin figure can be kept off most screens.