Last updated: 11.09.2020

Applies from: 2018.12.00 and later

Tag syntax – Text

Syntax: <item name= "tagg"/>

Copy code

Example: retrieves the order number on the order

<item name="DEL_Id"/>

Lists

There may be many instances of some items in an order, such as packages and shipments. In order to be able to display information about such objects in the report, the tag has to be combined with a list tag so that all the instances of the item are counted. The result is a list with one or more entries.

The list in the report can be structured in various ways. A heading can be entered for the whole list, or a description can be written that repeats on each line. It is also possible to combine several tags belonging to the same list, thus creating a list with, for example, the package ID and the weight of each package in an order.

The entries in the list do not have to be numbers, but can also be text, for example PAC_Text, which returns the free text field for the packages in an order.

Syntax:

Optional text

<query command="listtagg">

Optional text: <item name="tagg"/>

</query>

Example 1

Copy code

List of package IDs and a description for each line

<query command="Packages">
Package ID: <item name="PAC_PackageId"/>    
</query>

Returns a list in the following format

Package ID: 134567

Package ID: 987645

Package ID: 345678

Example 2

Copy code

List of package IDs and a heading for the whole list

Packages
<query command="Packages">
- <item name="PAC_PackageId"/>    
</query>

Returns a list in the following format

Packages

 

- 134567

- 987645

- 345678

Example 3

Copy code

List of package IDs, weight and goods text

Packages <query command="Packages">
<item name="PAC_PackageId"/>: <item name="PAC_Weight"/> kg (<item name="PAC_Text"/>)
</query>

Returns a list in the following format

Packages

123456: 1.200000 kg (Folder with documents)

356789: 3.400000 kg (Fragile)

986554: 5.600000 kg (Accessories)

Figures

Numbers are stored with six decimal places in the Opter database. To round to fewer than six decimal places, enter a format tag and the number of desired decimal places, based on the format 0.00, in the tag that returns the number. The number of zeros entered after the decimal point defines the number of decimal places.

To exclude unnecessary zeros at the end of numbers (2.7 instead of 2.70), but print the decimal if it is not a zero (2.73), enter # signs for the number of decimal places that are to be shown.

Syntax: <item name="tagg för numeriskt värde" format="0.######"/>

Example 1

Copy code

Always displays two decimal places whether they have a value or not

Weight <query command="Packages">
<item name="PAC_Weight" format="0.00"/> kg
</query>

Returns a list in the following format

Weight

2.00 kg

2.70 kg

12.74 kg

Example 2

Copy code

Displays up to three decimal places if they have a value

Weight <query command="Packages">
<item name="PAC_Weight" format="0.###"/> kg
</query>

Returns a list in the following format

Weight

2 kg

2.7 kg

12.738 kg

Example 3

Copy code

Always displays two-digit integers and two decimal places

Weight <query command="Packages">
<item name="PAC_Weight" format="00.00"/> kg
</query>

Returns a list in the following format

Weight

02.00 kg

02.70 kg

12.74 kg


See also

Creating reports for notifications

Reports (window)

Report editor, window