KNOWLEDGE BASE ARTICLE

Sample OnSave event routines

Custom event routines (*.exe files) can be run to process zone values. These can be helpful in carrying out real-time tests or changes to zone values that would not otherwise be possible. Typical uses might be to strip out characters, test for unusual formats, run validations etc.

Index values (eg. the zone value) are passed as programme arguments. An output is required from the routine and will be used as the index value to be saved.

The sample code below accepts the entered zone value and does a simple multiplication of the value and returns the result as the saved index value.

Sample OnSave event code

The sample code below shows how easy it is to replace some characters within a zone value and return the result to be used as the saved index value. In this case we are changing a date format to a format that can be used as a file name (replacing the '/' to a '.').

Sample OnSave event code

Link to this article http://umango.com/KB?article=33