MicroStrategy ONE

Block Library

MicroStrategy Web defines a Block Library that comprises a collection of blocks used across the Web application. The definition of this Block Library is represented in a simple XML syntax. This Block Library is available as individual XML files in the WEB-INF\xml\blocks folder of the MicroStrategy Web installation.

In the Block Library XML, a block element declares a block. Each block must have a unique name which is specified by the name attribute. Consider a block used for storing information about a MicroStrategy object in the metadata. This block requires a property that stores the GUID that identifies the object in a given metadata, another property that identifies the type of object, and a third property that stores name of the metadata object. Here is the declaration of such a block.

Copy
<block name="Object">
  <definition>
    <property name="dssid" type="String" />
    <property name="dsstp" type="Integer" />
    <property name="dssname" type="String" />
  </definition>
</block>

Based on the declaration above, block “Object” has three properties.

  • Property named "dssid" which stores a String value (GUID that identifies the object in a given metadata).

  • Property named "dsstp" which can store an Integer value (type of object: Report (3), Folder (8), Filter (1), etc.,).  

  • Property named "dssname" which can store a String value (readable name of the metadata object (e.g., "Sales Performance By Region")).

Beside String and Integer, other valid values of the type attribute are:

  • Boolean—Acceptable values are 'true' and 'false'.

  • Block—In this case, the value of the property is a reference to a "child" block.

  • List—In this case, the value of the property is a single dimensioned list of blocks.

The Block Library is used extensively to create new blocks or modify properties of existing blocks.