MicroStrategy ONE
Creating a procedure
Creating a procedure is very similar to creating a script. The Procedure window is used in much the same way as the standard Script window.
Procedures are only available for use with project sources. Procedures cannot be used with Narrowcast Server statements.
To create a new procedure
- In Command Manager, from the File menu, select New Procedure. A Procedure window opens.
- In the Properties tab, in the Name field, type the name of the procedure. This is the name that the procedure is saved under in the Procedures folder.
- In the Description field, type a description of the procedure. This description is shown in the comments for the procedure's outline.
- To include any additional classes, click the Browse (...) button next to the Classpath field. Browse to the class file and click Accept.
-
Type your procedure in the Code Editor tab. Many of the steps for editing a script, such as indenting, commenting, and inserting sample script statements, apply to procedures as well. For detailed instructions, see Editing a script.
The syntax highlighting for procedures is different than the syntax highlighting for Command Manager scripts.
- To create an input for your procedure, in the Properties tab click . Click in the Name column to rename the input. To change the type of the input (for example, String or Integer), click the Type column and select the new type from the drop-down list.
- In the Sample Editor tab, type an example of how to execute the procedure, with inputs.
- To test the procedure, follow the steps in Testing a procedure against a project source.
- To save the procedure, from the File menu select Save. The procedure is saved in the directory specified in the General tab of the Options dialog box, under the name specified in the Name field in the Properties tab. For more information about how procedures are saved, see Saving and loading a procedure.
Related Topics
Using Java in Command Manager procedures
Enabling or disabling syntax highlighting