Tables & data
Format content based on your data
A styling rule changes how content looks when a condition about your data holds: an overdue status printed in red, a negative balance highlighted, a premium customer's box tinted gold. The words stay the same; only their look changes, record by record. To print or hide content instead, see Show only when.
Before you start
- In the hosted app, changing a template needs the editor role or higher; local mode has no roles.
- Work in the Flow view; the Paged view is read-only.
- Open the properties panel: select the element, then press ⌘. (Ctrl+. on Windows) or the panel button at the far right of the app bar (tooltip Show properties panel).
Styling rules exist in two places:
| Content | Where to find the rules |
|---|---|
| Headings, paragraphs, lists and sections | The Conditional section of the panel, under Conditional styling |
| The cells of a table column | The column's card (open it with its ▸ caret), under Conditional formatting, then Conditional styling |
Other elements, such as images, whole tables, repeats, columns, grids, barcodes and dividers, have no styling rules. Their Conditional section offers only Show only when a condition is met.
Add a rule
- Under Conditional styling, press + Add styling rule.
- Under When this holds…, build the condition. It starts as a Comparison: a Field
(a value from your data, entered as a path such as
item.Status), an operator (=, ≠, >, ≥, <, ≤), and a Fixed value you type, set to Text, Number, True / False or Empty. Each part's menu can change its kind, for example to And / Or to combine conditions or Calculation for arithmetic. - Set the look with Text color, Fill, Size (pt) and Font. A section's rule has only Fill and Font: a section prints no text of its own to colour or size.
A new rule's condition starts with a stand-in field that is not in your data, so the rule changes nothing until you finish the condition. Each look setting starts at No change (Size (pt) starts empty) and only what you set changes. Clear beside a colour puts it back to No change. The ✕ at the top of a rule (tooltip Remove styling rule) deletes it.
In a table column, the condition is about the row: refer to it through the table's Binding
name, item unless changed. The condition can test any field of the row, not just the one the
column shows. On a block inside a Repeat, item is the current item in the same way.
What each setting changes
| Setting | Heading, paragraph, list | Section | Table cell |
|---|---|---|---|
| Text color | The text | No effect | The cell's text |
| Fill | A background behind the whole block | A background behind the whole section, title included | The cell's background, over any column fill |
| Size (pt) | The text size | No effect | The cell's text size |
| Font | The typeface | The typeface of everything inside that does not set its own | The cell's typeface |
A rule's settings win over the element's own settings for the same property; everything else stays as it was. A heading made red by a rule stays at its usual size, for example. Text you formatted by hand inside the element, such as one coloured word, keeps its own formatting.
When several rules match
Rules are checked from the top. The first rule whose condition holds is applied and the rest are ignored for that record, so their settings never combine. With two or more rules, the panel notes First match wins. New rules are added at the bottom and there is no control to reorder them, so add the most specific rule first.
Example: overdue invoices in red
In a table of invoices with a Status column:
- Select the table, open the Status column's card, and open Conditional formatting.
- Press + Add styling rule.
- Set the Field to
item.Status, keep =, and type Overdue as a Text fixed value. - Pick a red Text color and a pale red Fill.
Overdue rows print their status cell in red; every other row is unchanged. To colour the due date
too, add the same rule to the Due date column, still testing item.Status.
Weft has no built-in today's date, so it cannot work out for itself that a date has passed. Base the rule on something your data carries, such as a status or a days-overdue number.
Example: highlight negative numbers
On an Amount column, or a paragraph that shows a balance:
- In the column's Conditional formatting, or the paragraph's Conditional section, press + Add styling rule.
- Set the Field to the amount, such as
item.Amountin a table orrecord.Balancefor a paragraph, and change = to <. - Set the Fixed value type to Number and enter 0.
- Pick a red Text color.

A missing or blank amount never counts as less than 0, so empty cells stay unstyled. You can add
a second rule, item.Amount > 10000 with a green Fill, for large amounts. No value
matches both, so their order does not matter here.
Use the same rules on every column
The three-dot menu on a column's card has Apply format to all columns. It copies this column's styling rules, along with its alignment, width and fill, onto every other column, replacing theirs. It never copies headers, cell content, totals or the Show cell only when a condition is met setting.
Check the result
Switch the record you are previewing to see each case: open the data pill above the document (the button that names the data you are previewing, such as Full quote) and choose another sample under Preview shape, or, in the hosted app, choose a data source under Render source and press Use live data. Fills print in the PDF; confirm with Preview PDF.
Good to know
- A column's rules apply to the table's ordinary rows only, not to its header, footer, group rows, subtotals or sub-rows.
- = and ≠ compare exactly, type included: a Number 5 does not equal a Text 5, and Overdue does not equal overdue. >, ≥, < and ≤ do not hold when either side is missing.
- A rule written by Buddy can set other appearance settings as well. The panel shows and edits only these four, and leaves the others in place.
What next
- Hide content instead of restyling it → Show only when
- Compare a calculated value → Formulas
- Column settings in full → Table element
- Style settings in full → Shared element properties