Calling a Utility Script from a Script - System Administration - On-Premises - English - Foundation 22.1 - OnBase - Essential - Premier - Standard - external - Standard - Essential - Premier

On-Premises System Administration

Platform
OnBase
Product
System Administration - On-Premises
Release
Foundation 22.1
License
Standard
Essential
Premier

Utility scripts are duplicate script code that is not used elsewhere as a stand-alone script. If you have large amounts of code used in multiple scripts, you may wish to maintain duplicate code as a utility script and call that code from other scripts. To call utility scripts, use the ScriptInclude macro in one of the following formats: <<ScriptInclude:[script ID]>> or << ScriptIncludeName:[script name]>> .

For example, if a script included the text <<ScriptInclude:101>>, the utility script with ID number 101 is inserted in place of the macro when the script is run. Alternately, you can call the script by name. Using the script name is particularly helpful when script numbers may be different between production and test environments.

If the utility script does not exist in the database, an error is displayed when the script is executed.

Note:

It is recommended that you call only utility scripts from another script. If you attempt to call stand-alone scripts, certain errors can occur if certain script functions are used more than once in a script. For example, if script 1 and script 2 both have Option Explicit set, and script 1 has a ScriptInclude macro to include script 2, then script 1 will fail because Option Explicit is called twice in the same script.