Use Control Variable @validforprint to Prevent CODESOFT from Printing Labels – CODESOFT Instructional Article


This Instruction Article explains how to use the @validforprint function to prevent CODESOFT from printing labels.


When creating a CODESOFT label template that allows user to manually enter data before printing, there will be time where you want to make sure that the data that user entered is valid. For example – expiration date should be after manufacturing date, item quantity needs to be in certain range etc. In this case, you would not want the system to print labels with invalid data.

CODESOFT has a mechanism for template designer to control label’s validity – a control variable @validforprint. Setting the value of @validforprint to 0 using a variable in a formula embedded in the label design will not allow the user to execute the print job.  If the value 0 appears within a print run of other valid labels, CODESOFT will not allow the print job to be created for that specific label and provide a warning message.

Outside Sources and Helpful Links

For full listing of control variables, please see:

How to set control variables:



Was this article helpful?

Related Articles