Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 in < 10 units.

Info

If you don’t like reading, you can watch the video.

Panel
panelIconId1f3a5
panelIcon:movie_camera:
panelIconText🎥
bgColor#DEEBFF

No video

premium_VBSCRIPTING_product_userguide_UG - v0.1.pdf

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