Query and bulk operations (Script tab)
The Bulk Operations Script tab is available through either the Query
Builder or multiselect (bulk) operations.
The primary difference between the Script tab that opens through the
Query Builder and the Script tab that opens when you select multiple objects
is when the system runs the script:
- When performing a query, the program runs the script before it displays
the results in the details pane.
- When selecting multiple objects, you must first select the objects
in the result pane and then initiate bulk operations. Then you can
define and run the script on those objects.
This Script tab specifies the script you want to execute against the
set of selected objects. You can either type in the script or insert it
from a previously saved script. Once you have defined a script, you may
also choose to save it to a file that you can use at another time.
The following paragraphs describe the options provided on the Script
tab:
- Execute Script
- Select the check box if you want to run the script. When selected, you can
use the other options shown on this tab. Clear the check box to prevent the
script from running.
- Script Type
- Select a scripting language: VBScript (Visual
Basic script) or JScript (JavaScript). The
system inserts an empty prototype code block for the selected script.
- Load
- Loads a script file you want to load into the command window. Click Load
and navigate to the folder that contains the script you want to use. Select
the vbs or js file name, then click Open. This
replaces any content in the command window with a script contained in the
selected file.
- Save
- Saves code defined in the command window to a js or vbs file, which you can load at another time. Click Save, then navigate
to the folder where you want to copy the scripting code. Type in a name you
want to assign to the file, then click Save.
The system automatically appends the file type extension, based on the Script
Type specified.
- Insert
- Inserts code anywhere within the command windows. Position
your cursor where you want to insert scripting code, click Insert,
and navigate to the folder that contains the script you want to use. Select
the vbs or js file name, then click Open. This inserts script
where your cursor is positioned in the command window. This enables you to
insert more than one set of commands without replacing other commands.