Formatter Basics
Attributes (variables) are passed into formatters using vertical pipe characters: |[item.attribute | formatter(parameters)]
where formatter is the name of the formatter and parameters is an optional set of parameters to control formatter output. Multiple formatters can be used by delimiting each formatter with a vertical pipe; the formatters will be evaluated from left to right and the output from one formatter will be “piped” into the next formatter:
[item.attribute | formatter(parameters) | formatter(parameters) | ...]
Examples
-
In the following snippet any ”*” character in the
myidattribute’s value is replaced by ”-”, and the resulting value is assigned toinput1.id. -
Below, two value formatters are chained with the pipe (”|”) character. In the example, only
.logfiles are pushed from the operation. -
The total cost for a purchase order line item may need to be calculated by multiplying the item quantity with the price-per-item.