Filters change how information looks on a generated document without changing the original information in OnRent Events. For example, you can display a price as currency, change text to uppercase or choose how a date appears. Put the filter after the vertical line (|).
Date, time and number filters
Use these to make dates, times, quantities and prices easier to read. “localedate” formats a date for the user’s language settings, “localedatetime” includes the time, and “currency” formats a price. A value after a colon gives an extra instruction, such as the number of decimal places.
When using now, apply a timezone if you need a regional time rather than UTC. The date-format parameter reference appears after the object tables.
Filter | What it does | Example | Example output |
localedate | Formats a date for the user’s language | {{ invoice.invoiced_at | localedate }} | 03/12/2026 |
localedatetime | Formats date and time for the user’s language | {{ order.deliver_starts_at | localedatetime }} | 04/12/2026 09:00 |
timezone | Converts a date/time to a specified timezone | {{ 'now' | timezone:"Europe/London" | localedatetime }} | 03/12/2026 14:50 |
number | Formats decimal places | {{ item.quantity | number:3 }} | 2.000 |
currency | Formats a value as currency | {{ item.price | currency }} | £49.50 |
date | Formats a date with a custom pattern | {{ order.starts_at | date: "%Y-%m-%d" }} | 2026-12-03 |
Text and string filters
“String” simply means text. These filters can add words before or after a name, change capital letters, shorten text or preserve line breaks. For example, “prepend” can put “Order: ” before an opportunity name.
Filter | Purpose | Example | Example output |
newline_to_br | Converts line breaks to HTML breaks | {{ order.external_description | newline_to_br }} | Line one<br />Line two |
markdown | Renders Markdown-formatted text | {{ order.external_description | markdown }} | Includes setup (shown in bold) |
append | Adds text to the end | {{ order.name | append:"!" }} | Summer Conference! |
capitalize | Capitalises the first character | {{ order.name | capitalize }} | Summer conference |
downcase | Converts to lowercase | {{ order.name | downcase }} | summer conference |
upcase | Converts to uppercase | {{ company.name | upcase }} | EXAMPLE EVENTS LTD |
prepend | Adds text at the start | {{ order.name | prepend:"Order: " }} | Order: Summer Conference |
remove | Removes all matches | {{ order.name | remove:"Opportunity" }} | Summer |
remove_first | Removes the first match | {{ item.name | remove_first:"Internal" }} | Projector |
truncate | Shortens text to a specified length | {{ item.name | truncate:3 }} | ... |
Maths filters
Use these for calculations or rounding in a document. For example, “round” changes 1.6 to 2, and “times:2” doubles a number. This changes the displayed result, not the original stored price.
Filter | Purpose | Example | Example output |
ceil | Rounds up | {{ item.price | ceil }} | 13 |
divided_by | Divides a value | {{ item.price | divided_by:2 }} | 6.3 |
floor | Rounds down | {{ item.price | floor }} | 12 |
minus | Subtracts | {{ order.charge_including_tax_total | minus:order.tax_total }} | 100 |
modulo | Returns remainder | {{ item.quantity | modulo:2 }} | 1 |
plus | Adds | {{ item.price | plus:10 }} | 22.6 |
round | Rounds to integer or given precision | {{ item.price | round }} | 13 |
times | Multiplies | {{ item.price | times:2 }} | 25.2 |
Collection filters
A “collection” means a list of records, such as project quotations. “first” picks the first entry, “last” picks the last, and “sort” puts the entries in order by a chosen field.
Filter | Purpose | Example | Example output |
first | First element | {{ item.accessories | first }} | Cable |
last | Last element | {{ item.accessories | last }} | Stand |
sort | Sort by an attribute | {% assign sorted_quotations = project.quotations | sort:"name" %} | No visible output. The quotations are saved as sorted_quotations, in name order. |