There may be times where you may need to produce more than 2 labels from one CODESOFT label file. This Instruction Article explains how to design fields on labels to print conditionally. You can use this technique to generate multiple label design on one label file.
Note: If you only need 2 labels designs for one CODESOFT label file, this technique may be too complicated. See this article: http://support.efficientbi.com/?post_type=ht_kb&p=4062&preview_id=4062&preview_nonce=2082c97230&preview=true
The principle of how to create multiple label design on one label template is to make value of the fields conditionally. Some of the possible conditions are: Counter, Serial number, a specific word in the data, date, time, etc. In attached example, we use a counter as the conditional factor.
In order to understand this example, you need a basic understanding of MOD (Modulo) function. in short, MOD function returns the remainder of A divided by B.
5 mod 4 = 1, 6 mod 4 = 2
7 mod 4 = 3, 8 mod 4 = 0
9 mod 4 = 1, 10 mod 4 = 2
In the example (need to change the file extension from .lab.txt to be .lab) there are 5 different fields Text1,2,3,4 and 6 in the label. The fields Text1-4 are the ones used to demonstrate the conditional value. The field Text6 is for displaying the content of the ‘When Printed’ variable Starting Counter. The Starting Counter is to increase by 1 for every label printed.
Text1 field will have the value “Label A” when the mod value is 0
if(mod(Starting Counter , 4) = 0,”Label A”, “”)
Text2 field will have the value “Label B” when the mod value is 1
if(mod(Starting Counter , 4) = 1,”Label B”,””)
Text3 field will have the value “Label C” when the mod value is 2
if(mod(Starting Counter , 4) = 2,”Label C, “”)
Text4 field will have the value “Label D” when the mod value is 3
if(mod(Starting Counter , 4) = 3,”Label D, “”)
To see the result, print the label and select the ‘Labels in the series’ to be higher than 5 so you can see the full result.
You can use this technique to make parts of the label content invisible by setting the field values to blank.
At this time, you probably think that this is rather complicated. You are correct. This can make the label design process very tedious and complex as you may have the multiple fields (different data types) occupying the same location on the label.
Outside Sources and Helpful Links