MicroStrategy ONE

Inserting sample statements: Outlines

Outlines are preconstructed statements with optional features and user-defined parameters clearly marked. The Command Manager script outlines help you insert script statements with the correct syntax into your scripts. Command Manager also includes a number of sample procedures and procedure outlines.

You can choose an outline to use in your script in the Choose Outline dialog box. To access the Choose Outline dialog box, click the Insert Outline icon on the toolbar, or from the Edit menu select Insert Outline.

Outlines are grouped based on the type of objects that they affect. The outlines that are available to be inserted depend on whether the active Script window is connected to a project source or a Narrowcast server. Only outlines appropriate to the connected metadata source are available.

Sample Command Manager procedures are available under the Procedures outlines, in Sample Procedures. Any user-created procedures are also available under the Procedures outlines, in User Procedures.

Outline syntax

The following applies to the syntax within outlines:

  • Optional features appear within brackets [ ].
  • If you have a choice between two or more features, they appear within parentheses, separated by a vertical bar ( | ).
  • Words in angle brackets < > are placeholders for information that you provide.

All of these symbols should be removed from the script before executing it.

For example, the outline for expiring report caches in a project source looks like this:

Copy
EXPIRE ([ALL] REPORT CACHES | REPORT CACHE "<cache_name>") 
 IN PROJECT "<project_name>";

The brackets indicate that the word ALL is optional; it can be left out altogether. The parentheses and vertical bar indicate that the command must contain either REPORT CACHES or REPORT CACHE "<cache_name>". Finally, the angle brackets around cache_name and project_name indicate that you will need to replace them with the name of the report cache you wish to expire and the name of the project that contains the report cache or caches to be expired.

After selecting the options you wish to use from the outline, and replacing any placeholders, the statement might look like this:

Copy
EXPIRE ALL REPORT CACHES IN PROJECT "Enterprise 
 Manager";

Privileges and time zones

There are two special sets of Command Manager outlines:

  • In the project source outlines, under Privileges_Outlines, the Privileges_List outline is in the form of a list with check boxes. Selecting one or more check boxes and clicking Insert inserts a comma-separated list of those privileges. Selecting the check box for a privilege group automatically selects all privileges included in that group.
  • In the Narrowcast Server outlines, under Subscription_Book_Outlines, the TimeZones_List outline is in the form of a selectable list of time zones. Selecting one time zone and clicking Insertinserts the numeric code for that time zone.

To insert an outline into a script

  1. Click in the Script window at the point where you wish to insert the outline.
  2. From the Edit menu, point to Insert / Search Objects, and then choose Outlines. The Choose Outline dialog box opens.
  3. Navigate the Outline tree to locate the outline you want, and select it. The outline appears in the right side of the dialog box.
  4. Click Insert. The outline is inserted into your script.
  5. Click Cancel to close the Choose Outline dialog box.
  6. In the Script window, remove any optional components of the outline (indicated by square brackets [ ] ) that you do not need.
  7. Choose the exclusive options (indicated by parentheses and vertical bars ( | ) ) that you wish to use, and delete those alternatives that you do not want to use.
  8. Replace any placeholder words (indicated by angle brackets < > ) with their proper values.
  9. The outline is now corrected and ready to use.

To insert part of an outline into a script

  1. Click in the Script window at the point where you wish to insert the outline.
  2. From the Edit menu, point to Insert / Search Objects, and then choose Outlines. The Choose Outline dialog box opens.
  3. Navigate the Outline tree to locate the outline you want, and select it. The outline appears in the right side of the dialog box.
  4. Select the portion of the outline you want to insert into the script.
  5. Click Insert. The outline selection is inserted into your script.
  6. Click Cancel to close the Choose Outline dialog box.
  7. In the Script window, remove any optional components of the outline (indicated by square brackets [ ] ) that you do not need.
  8. Choose the exclusive options (indicated by parentheses and vertical bars ( | ) ) that you wish to use, and delete those alternatives that you do not want to use.
  9. Replace any placeholder words (indicated by angle brackets < > ) with their proper values.
  10. The outline is now corrected and ready to use.

To insert a sample script statement into a script

  1. Click in the Script window at the point where you wish to insert the sample statement.
  2. From the Edit menu, point to Insert / Search Objects, and then choose Outlines. The Choose Outline dialog box opens.
  3. Navigate the Outline tree to locate the outline you want, and select it. The outline appears in the right side of the dialog box.
  4. Select the portion of the sample script statement that you want to insert.
  5. Click Insert. The script sample selection is inserted into your script.
  6. Click Cancel. The Choose Outline dialog box closes.

Related Topics

Editing a script

Choose Outline dialog box

Command Manager syntax

Sample procedures