Scripts contain the instructions for displaying the text in the notification. These instructions include the "boilerplate" text (the fixed text that doesn't change) and the field name, which supplies the data that you want to include in the notification. You can create your own scripts or edit existing scripts.
Because different notification systems (email, pagers, video wall) display different amounts and formats of text, you will need a different script for each of the ways you send notifications.
Developing scripts requires a solid understanding of databases and script programming. In most facilities, the IT department is responsible for developing scripts. If you have special scripting needs, be sure to work with the correct resources in your organization.
1. In the Administration area of the navigation bar, click Scripts.
2. Click New…
3. In the Description field, type Frame Defect Email.
4. Enable the Is Active? checkbox.
5. Click the Edit Script link. Use the Edit Script window to enter the following script code.
ScriptInfo.Write("<msg>\n");
// first line
ScriptInfo.Write("<line>");
ScriptInfo.Write("The following concern has been reported: " + ScriptInfo.Value("concern"));
ScriptInfo.Write("\n</line>");
// 2nd line
ScriptInfo.Write("<line>");
ScriptInfo.Write("Found on: " + ScriptInfo.Value("part"));
ScriptInfo.Write("\n</line>");
// 3rd line
ScriptInfo.Write("<line>");
ScriptInfo.Write("Reported at defect station: " + ScriptInfo.Value("defect_station"));
ScriptInfo.Write("\n</line>");
// 4th line
ScriptInfo.Write("<line>");
ScriptInfo.Write("Unit number: " + ScriptInfo.Value("id1"));
ScriptInfo.Write("\n</line>");
// 5th line
ScriptInfo.Write("<line>");
ScriptInfo.Write("Rank: " + ScriptInfo.Value("rank"));
ScriptInfo.Write("</line>");
ScriptInfo.Write("</msg>");
6. Click the Script Language arrow and choose JavaScript from the list.
7. Click Done to return to the Scripts window.