No formatters can be chained after hideBegin
, hideEnd
, showBegin
, showEnd
.
By default, condition formatters have a special behavior, the formatter's result is not propagated to the next formatter if the result of the condition is true. This enables test chaining with Dynamic parameters.
Hide and show a part of the document with the following formatters:
hideBegin
/ hideEnd
: hide text block between hideBegin
and hideEnd
if condition is true.
showBegin
/ showEnd
: show a text block between showBegin and showEnd if condition is true.
ifEQ (value)
: Matches values that are equal to a specified value.
ifNE (value)
: Matches all values that are not equal to a specified value.
ifGT (value)
: Matches values that are greater than a specified value.
ifGTE (value)
: Matches values that are greater than or equal to a specified value.
ifLT (value)
: Matches values that are less than a specified value.
ifLTE (value)
: Matches values that are less than or equal to a specified value.
ifIN (value)
: Matches any of the values specified in an array or string.
ifNIN (value)
: Matches none of the values specified in an array or string
ifEM ()
: Matches empty values, string, arrays or objects.
ifNEM ()
: Matches not empty values, string, arrays or objects.
and (value)
: AND
operator between two consecutive conditional formatters.
or (value)
: (default) OR
operator between 2 consecutive conditional formatters.
show (message)
: print a message if a condition is true.
elseShow (message)
: print a message if a condition is false.
Data
one = { d.status1:ifEQ(2):show(two):or(.status1):ifEQ(1):show(one):elseShow(unknown) }
two = { d.status2:ifEQ(2):show(two):or(.status2):ifEQ(1):show(one):elseShow(unknown) }
three = { d.status3:ifEQ(2):show(two):or(.status3):ifEQ(1):show(one):elseShow(unknown) }
one = "one"
two = "two"
three = "unknown"
Supported file formats: DOCX
, ODT
, and PDF
.
when you use the drop
formatter, the tag value is not printed and chained formatters are not executed
to drop a group of elements, use #hidebegin-hideend or #showbegin-showend
use the drop
formatter to delete elements from a document. The first argument passed to :drop(argument1)
is the element to drop
p
to drop paragraphs
usage: {d.text:ifEM:drop(p)}
include the tag within a paragraph, and all the elements it comprises are also removed if the condition is validated (external help page)
row
to drop table rows
usage: {d.data:ifEM:drop(row)}
include the tag in a table row, and all the elements it comprises are also deleted if the condition is validated (external help page)
Optionally, use nbrRowsToHide
to set the number of rows to drop as a second argument {d.data:ifEM:drop(row, nbrRowsToHide)}
, such as {d.data:ifEM:drop(row, 3)}
, meaning the current and next two rows is removed if the condition is validated.
By default, the formatter :drop(row)
hides only the current row.
img
to drop pictures
usage: {d.img:ifEM:drop(img)}
include the tag within the image title, description, or alternative text (external help page)
chart
to drop charts
usage: {d.dataset:ifEM:drop(chart)}
include the tag within the alternative text of the graphic (external help page)
shape
to drop shape (square, circle, arrows, etc.)
usage: {d.dataset:ifEM:drop(chart)}
include the tag within the title, description or alternative text of the shape (external help page)
Shows a text block between showBegin
and showEnd
if a condition is true.
Use only break lines (shift
+ Enter
) between showBegin
and showEnd
.
Learn more about why conditional formatters are adding empty lines.
Data
Banana{d.toBuy:ifEQ(true):showBegin} Apple Pineapple {d.toBuy:showEnd}grapes
Banana Apple Pineapple grapes
Hides a text block between hideBegin
and hideEnd
if a condition is true.
Use only break lines (shift
+ Enter
) between hideBegin
and hideEnd
. Learn more about why conditional formatters are adding empty lines.
Data
Banana{d.toBuy:ifEQ(true):hideBegin} Apple Pineapple {d.toBuy:hideEnd}grapes
Banana grapes
Changes the default operator between conditional formatters.
{d.car:ifEQ('delorean'):and(.speed):ifGT(80):show('TravelInTime'):elseShow('StayHere')}
means "if d.car equals 'delorean' AND d.speed is greater than 80, then it prints 'TravelInTime', otherwise it prints 'StayHere'
Changes the default operator between conditional formatters.
{d.car:ifEQ('delorean'):or(.speed):ifGT(80):show('TravelInTime'):elseShow('StayHere')}
means "if d.car equals 'delorean' OR d.speed is greater than 80, then it prints 'TravelInTime', otherwise
it prints 'StayHere'
Matches empty values, string, arrays or objects (null, undefined, [], {}, ...).
Matches not empty values, string, arrays or objects.
matches all values that are equal to a specified value
can be combined with other formatters to create conditional content
returns the initial marker
the state of the condition is not returned
matches all values that are not equal to a specified value
can be combined with other formatters to create conditional content
returns the initial marker
the state of the condition is not returned
Matches values that are greater than a specified value.
Matches values that are greater than or equal to a specified value.
Matches values that are less than a specified value.
Matches values that are less than or equal to a specified value.
Matches any of the values specified in an array or string.
Matches none of the values specified in an array or string.
prints a message if the condition is true
use with other formatters to print conditional content
print a message if the condition is false
use with other formatters to print conditional content
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
Parameters | Description | Type |
---|---|---|
value
[optional] new value to test
mixed
value
[optional] new value to test
mixed
value
value to test
string, integer
value
value to test
string, integer
value
value to test
integer
value
value to test
integer
value
value to test
integer
value
value to test
integer
value
value to test
integer
value
value to test
integer
message
message to print
message
message to print