About programs
Programs contain the JavaScript functions that are the logic behind the transformation of label data.
In Enhancement Engine, a program is an ordered set of functions that runs in response to a label request.
After you create and test a function or set of functions, you add the functions to a program. The functions must be listed in order of execution, but you can change the order when necessary. You can disable a function within a program, and then enable it again when needed.
The printLabels command must be included within a function in the program if you want a label to be sent to a printer.
Each function in the program must rely on the same .xml file label request.
The _FORMAT attribute in the .xml file, the name of the program, and the name of the label template in Label Designer must all match exactly in order for these items to be associated with each other.
As long as EPP finds the program with the same name as the label template being used, your functions edit the label requests and the printed labels are enhanced with the data transformations you specified.
Create a program
To utilize Enhancement Engine, you create programs that enhance label output with data transformations.
To create a program, complete the following steps in EPP.
-
Go to Develop > Enhancement Engine.
-
Under Programs, right-click and select New Program.Step InformationNote:You can import a program. You can also copy and edit an existing program.
-
Enter a name for the program, and select OK.
-
Under Functions, from the Development folder, drag and drop functions as desired into the program window. To use a sample function, you must first copy it into the Development folder.Step InformationNote:Functions must be listed in order of execution. You can change the order at any time.Note:If you want a label to be printed, the PrintLabels function must be included in the program.
-
To associate label variable data with the program, for Test Input, select an .xml data file from the list.
-
To save the program after the addition of each function, select Apply. To save program and close the window, select OK.Step InformationNote:You can disable a function without having to remove it from the program. Right-click on the function and select Disable.
-
Select Test.
-
To ensure the program ran successfully, review the data and the results on the tabs.
-
Output: Shows data about the test, such as test status and test length. Also contains a copy of the Input Data, the Input Label, and the Output Labels.
-
Input Data: Shows a copy of the .xml file used as the test input.
-
Input Label: Shows the label data prior to your testing the program.
-
Output Labels: Shows the label data changes applied by the program.
-
Raw Output: Shows all test and label data.
-
As long as EPP finds the program with the same name as the label template being used, your functions modify the label requests and the printed labels are enhanced with the data transformations you specified.
Loading...
There was a problem loading this topic