RSJ-Labelprinter - follow the QR-Code RSJ-Next Generation Label Printing System - makes workflow easier RSJ-Software, Company Logo

Python API

You could include a small Python script block with each label field.

This script could:

  • Access all data fields in the current record
  • Modify the current field

The API is especially useful, if you want to handle a field differently when another field has a special value, when you want to apply some calculation with the value, or when you want to use some field formatting not supported by the base system.

Accessing Field Values

Your script block is executed with 2 local variables accessible:

val
Current field (in/out). This variable is None in the label script
parms.jobGet(xPath)
Value of any field in current record (in)

Modifying the Current Field

Simply overwrite val

Special functionality for labels scripts

Label scripts can change variables by calling:

parms.store(name, value)

Sample Script

if val==1:
  val=5  
© Copyright 2011-2023 by RSJ Software GmbH Germering. All rights reserved. - Version:1.12.0578