Last updated: 05.12.2023

Applies from: Opter 2023.12.00, Opter Driver for Android 1.9.0

Displaying package dimensions in the scan list (Opter Driver)

The dimensions from the package rows can be viewed in the scan list. The dimensions and text to be displayed are specified in a mobile data setting. The information string is then added to the scan block with a variable in App.Design. In this example, three pieces of information are added from the package rows: package type, weight and volume.

The same information is also displayed about those packages in the shipment that have not yet been scanned.

Tips!

We recommend combining this feature with scans of the same shipment displayed in a block in the scan list (see Displaying scans of the same shipment in a block (Opter Driver)). It does work to display the scans in separate blocks as well, but then all the packages in the shipment are shown in all blocks, which can make the list of scans difficult to easily understand.

Step 1: Decide which dimensions are to be displayed in the scan list

Add the mobile data setting PackageDimensionsString and enter “| Package type: {14} | Weight {1:0.##} kg | Volume: {2:0.##}" in the Value column. The variables ({0}-{15}) take their values from the package rows.

PackageDimensionsString is a free text field. This means that any text required can be written around the variables, for example:

For information on what other dimensions can be displayed, see Mobile data settings (window).

Variables that return numbers

For variables that return numbers, it is possible to specify how many decimal places to display in the scan list, and whether to exclude unnecessary trailing zeros at the end of the number. In our example (“Weight: {1:0.##} kg”), we have limited the number of decimals for the weight to a maximum of two, but if the weight is “8.00” on the package row, only “Weight: 8 kg” is displayed in the scan list. If the weight in the package row is “8.10”, “Weight: 8.1 kg” is displayed in the scan list. The unnecessary trailing zeros after the decimal point are deleted.

The syntax works in the same way as in text and HTML reports. The number of decimal places is limited by the number of zeros after the decimal point (0.00). To exclude unnecessary trailing zeros, enter # signs instead of zeros. The dot is converted to a comma in the app.

Obs!

Numbers are stored with six decimal places in the Opter database. If a limit is not defined, all numbers are always displayed to six decimal places. For example, if “Width: {5} m” is entered in PackageDimensionsString, “Width 2.000000 m” will be displayed in the scan list.

Copy code

Variables in PackageDimensionsString that return numbers

Weight: {1:0.00}
Volume: {2:0.##}
Load metres: {3:0.00#} 
Pallet space: {4:0}
Width: {5:0.00}
Height: {6:0.00}
Depth: {7:0.00}

Returns

Weight: 8.00

Volume: 8.12, or 8.1 (if the number on the package row is 8.10), or 8 (if the number on the package row is 8.00)

Load metres: 8.123, or 8.12 (if the number on the package row is 8.120), or 8.10 (if the number on the package row is 8.100)

Pallet space: 8

Width: 8.00

Height: 8.00

Depth: 8.00

Step 2: Add the variable in App.Design

Open App.Design (see App.Design) and add <item itemname="PACKAGE.DIMENSIONS"/> to the <scanrows> section, where the rows with package dimensions are required. Use multiline="true" so that the information can span several lines if it is too long. See line 15 in the code example below, scroll right to see PACKAGE.DIMENSIONS and multiline="true".

Example

Copy code
The scanrows section in App.Design
    <scanrows>
      <row>
        <item font="BOLD" itemname="CREDITEDTOOTHERRESOURCEBLOCK"/>
      </row>
      <row>
        <item font="BOLD" itemname="CREDITEDTOOTHERRESOURCEWARNING"/>
      </row>
      <row>
        <item font="BOLD" itemname="CREDITEDTOOTHERRESOURCE"/>
      </row>
      <row>
        <item itemname="STATUS,PACKAGECOUNT"/>
      </row>
      <row>
        <item itemname="PACKAGE.PACKAGEID,' ',PACKAGE.STATUS,' ',PACKAGE.DIMENSIONS" multiline="true"/>
      </row>
      <row>
        <item itemname="FREIGHTBILLTITLE,FREIGHTBILL"/>
      </row>
      <row>
        <item itemname="ADDRESSFROMTITLE,ADDRESSFROM"/>
      </row>
      <row>
        <item itemname="ADDRESSTOTITLE,ADDRESSTO"/>
      </row>
    </scanrows>

The above code gives the following results. Note that the volume does not fit on the screen, but is displayed on the next line thanks to multiline="true".


See also

Mobile data settings (window)

Displaying scans of the same shipment in a block (Opter Driver)

App.Design

The scan list in Opter Driver