Ah I think I understand better now. I’ll list out the steps here:
-
Have the ZPL code for the label
-
Ensure there is a variable within Tulip for each field to be updated
-
Write trigger logic to store an expression to a ZPL Code variable, inserting Tulip variables or record placeholder fields into the ZPL code. This logic should only be executed after all variables have been populated with their final values. I have included an example here:
Here is a snippet of the expression in plain text vs the original ZPL here:
Original:
MATERIALPLACEHOLDER‘^FS^FT15,90^A0N,19,20^FH^CI28^FDMaterial:^FS^CI27^BY1,3,76^FT15,319^BCN,Y,N^FH^FD>:’QUANTITYPLACEHOLDER‘^FS^FT15,234^A0N,19,20^FH^CI28^FDQuantity:^FS^CI27^BY1,3,82^FT231,177^BCN,Y,N^FH^FD>:’ +
In Expression Editor:
@Variable.MATERIALVariable.MATERIALVariable.MATERIALVariable.MATERIAL + ‘^FS^FT15,90^A0N,19,20^FH^CI28^FDMaterial:^FS^CI27^BY1,3,76^FT15,319^BCN,Y,N^F@Variable.QuantityVariable.Quantity^FD>:’ + TOTEXT(@Variable.Quantity**)** + ‘^FS^FT15,234^A0N,19,20^FH^CI28^FDQuantity:^FS^CI27^BY1,3,82^FT231,177^BCN,Y,N^FH^FD>:’ +
For example, you would replace {{FACILITY_NAME}} in your ZPL co@variable@variable.FacilityNameFacilityName@Table within the@Tableexpression with:
OR
- @Table Record.DetailsRecordPlaceholder.FacilityName +
If the ZPL code does not already have placeholders to highlight where the dynamic fields should be, you will probably need to request for these to be added or ask for a label with all values filled as “XXXXXXX” to make it easier to see where you will need to insert the Tulip variables.
- Create a trigger to send the ZPL code to the printer - I usually do this on a “Print” button:
The ZPL viewer unit test I shared is the best place to test your expression to ensure it is populating correctly without needing to print the labels directly.
Does this all make sense? Let me know if you have any questions!