Trigger Setup
In this sample, we will look at how to manipulate controls on the application from within the VB Scripting.
In this example, we will again use the Job Receipt application and change the Quantity field to be Red if the quantity entered is < 10 units.
If you don’t like reading, you can watch the video.
Try it!
Right-click on the Quantity text box and add a function for the “OnBeforeLostFocus” event.
From the Format Builder, select the Quantity Text box, specify a color and click “Add XML”.
Change the XML return to only reflect the BackColor change as below.
Add an If statement, evaluating the Quantity. Use the Field Selector to get the value in the Quantity text box for the evaluation. (Double Clicking it will add the code to the Code View)
Save & Close and Re-Open the application, testing the new logic applies.
Let’s review sample Scripts of how other functions within VBScripting works - Data Storage