Follow these steps to add a validation script to an entity field:

These steps use the Vehicle Identification Number (VIN) validation script from the Vehicles entity in the sample application for illustration purposes.

 

  1. Identify the field in an entity that requires additional validation beyond what is provided by the GE (including validation for Required fields and range validation for date/time and numeric fields).
  2. Open the Fields record for this field from its parent's Entities record.
  3. Click the Validation tab.
  4. On the Options sub-tab, change the Validation Type from Standard to Standard + Script or Script Only. This adds a Script sub-tab.
  5. Click the Script tab to view the blank Script control.
  6. Click the buttons in the Script toolbar to review the set of intrinsic Available Objects that you can use directly in the script, the set of available object you can reference within the script, and any available examples. 

     Blank Script Control
  7. Using VB.NET syntax, write a script that provides the validation required for this field.
  8. Click OK when finished to save and close the Fields record.
  9. Save and close the field's Entities record.
  10. Open a record in that entity and test the validation you just defined.