Product: LABELVIEW, CODESOFT
Version: All Versions
|
In order to enable this functionality, you will need to have pre-existing variable fields that you want to compare data with to facilitate the validation process.
In our example we are going to compare the value being used for a UPC-A barcode type (which requires exactly 11 characters, the 12th character is generated automatically as a check digit by the software) and ensure its length is exactly 11 characters, if it is not, then it will not allow us to print.
1. Create a When printed variable named Barcode Number and enter in a value.
2. Create a formula, make the name of the formula: @VALIDFORPRINT. In the value enter in an IF function that will do a comparison and determine if the value is a 1 (print) or 0 (do not print). In our example, we are comparing the LEN (length) of Barcode Number to 11. So if Barcode Number has 11 characters, it will display a 1, because it is true, otherwise it will be a 0 or false.
3. When we go to print, if Barcode Number only has 10 characters it will display the following message:
NOTE: In the Gold version of LABELVIEW and the Enterprise version of CODESOFT 2014 or later, a customized message can be created. For instructions on how to create the custom message click here.
|