Can be applied to all types where comparisons are possible
With the if option you can make a choice between two options. The syntax for the if option is:
if:operator:value:option1:option2
Imagine you have just done a count on a list. Then the following if statement can be added.
if:more:5:"list is greater than 5":"list is less than 5"
Can be applied to all types where comparisons are possible
With if_break you can ensure that under certain conditions the formatting options are canceled and a value is returned immediately. There are two options here. The first option is to abort and return the current value. The dataname below shows the number from the field celcius@temperature. If the value is above 0, the value is shown immediately. If the value below 0 is the value is multiplies by -1:
celcius@temperature|if_break:more/equal:0|math:*- 1
The second option you have with if_break is to abort and return a fixed value. The example below gives first two lines of the description. If there is no description, the text "no description known" is shown:
description@content|if_break:text_is:"":"no description known"|format: twoliner
In the condition options for datanames mentioned above, operators are used. The same set of operators can be use for all condition options in datanames. The following options are possible as value for the operator:
Do you want to participate in the dataname project? Or do you want to implement datanames and looking for some help? Send us a message and we'll be teaming up!
Datanames are an essential part of the Webanizr project