Script to Provide Incr-Decr Clear Value
Description
How to create an increment/decrement clear value for use with an LPS file drop.
LPS file drop does not provide for a clear value, however with the use of this script, a static clear value can be set if one is not provided in the pas/xml file drop.
Steps
To provide a clear value for incrementing and decrementing fields when the starting value can not be provided in the dropped file (.pas, .xml, .csv, etc.) due to front end system constraints, follow these steps.
- Set up a scripting field and an incr/decr data source field.
- Modify the example below using the names of the fields on your label.
- Copy the modified script into the scripting field data source window.
Copy
Sample script
<pre class="syntaxhighlighter-pre" xml:space="preserve">var INCREMENT = String(label.fields.field.(@name == 'INCREMENT').@data);
if (INCREMENT == "")
{
//define clear value
label.fields.field.(@name == 'INCREMENT').@data = "001";
}
</pre>
Article Number
2016012
Versions
Loftware Label A label is a design area on the computer screen where a label format is created or edited. Manager / Loftware Print Server versions 9.5.2.0 - 11.1
Environment
All supported installation environments.