MicroStrategy ONE
Script window
One Script window is displayed for each connection to a metadata source. In a Script window, you can:
- Create a script (click New Script on the toolbar, which adds a Script tab to the current Script window. You can add up to five Script tabs to one window.)
- Edit an existing script (click Open Script on the toolbar, or type directly in the editing pane of the Script window)
- Insert a script outline (click Insert Outline on the toolbar)
- Insert a previously executed script (select from the Script History drop-down list on the toolbar)
- Execute a script (click Execute on the toolbar)
- View the results of an executed script (click the Results tab in the Script window)
- View status and error messages addressing an executed script (click the Messages tab in the Script window)
The Script window has two panes:
- The editing (upper) pane contains the script itself. You can enter script statements, modify existing statements, or insert statements from outlines. Right-clicking in this pane brings up a menu with some standard Windows options and the following Command Manager-specific options:
- Clear Window: Clears the script area for the currently selected script. For detailed instructions, see Editing a script.
- Go To Line: Jumps to the line you specify in the currently selected script. For detailed instructions, see Editing a script.
- Font: Opens the Options dialog box, Display tab. From this tab you can set the font and font size for the editing area of all Script windows. For detailed instructions, see Editing a script.
- Script Type: Allows you to choose between normal Command Manager script syntax and Java syntax.
- Insert/Search Objects: Opens a submenu. From this menu you can open the Choose Outline dialog box or the Search for Objects dialog box. This allows you to select a script outline to insert into the currently selected script, or to search for specific objects to insert into the script. For more information about outlines, including detailed instructions, see Inserting sample statements: Outlines. For more information about searching for objects, including detailed instructions, see Inserting a list of objects into a script.
- The status (lower) pane displays the results, status messages, and error messages of submitted scripts. It includes:
- Results: Displays results associated with the current command script.
- Messages: Displays the status of the current command script, and the time it took the script to execute.
Right-clicking in the status pane brings up a menu that allows you to copy the results or messages to the clipboard, or clear the text in the status pane. If the Results tab is active, right-clicking in the status pane also allows you to change the format of the results or save them to a CSV file. For information about the different results formats, see Script output. For detailed instructions on exporting results to a CSV file, see Exporting the results of a script.
Command Manager allows you to open and edit up to five scripts for any given connection. Each of the opened scripts has its own tab within the Script window.
At the bottom of the Script window is a status bar with four sections:
- The first (left-most) section displays information about the execution status of the most recently executed script.
- The second section displays the amount of time the most recently executed script required to complete execution. If a script is currently executing, this section keeps a count of how long the script has been running.
- The third section displays the username and metadata source to which this Script window is connected.
- The fourth (right-most) section displays the location of the cursor (row and column) in the active script.
Related Topics
Opening a previously saved script
Changing the script display font