Category Archives: SDK

Search by ID is dead. Long live Search by ID!

It appears that someone at MicroStrategy was receptive enough to come up with the idea of including a search by ID function in version 9. It’s called… “Search by ID” (act surprised now) and it can be found under the Tools menu of the “Search for Objects” window.

This, and the new “Translate” function in MicroStrategy 9 render my “Search by ID v2” application almost obsolete. I refrain from calling it completely obsolete for the sole reason that it still offers the direct and recurring dependents export to Excel function. To the date I still haven’t found a recurring dependents search function in MicroStrategy Desktop.

By the way, since I was confronted with a case when this tool was not able to find an object, I feel compelled to add a small tech note. If the user you log in with doesn’t have the right to “see” a particular object, then of course this object won’t be found by Search by ID v2. This may happen if the object you are looking for is placed in a colleague’s personal folder, or if that object has some kind of “Deny all” permission set for your user/usergroup.

Search by ID v2

So, what’s new?
You can now export direct and recurring dependents of an object. That’s all.

Now for some background…

Direct dependents are the dependents found in MicroStrategy by right clicking on an object and selecting “Search for Dependents…”. The main difference is that Search By ID v2 exports them to an Excel file, whereas Desktop only allows the export to a non user friendly txt file.

Recurring dependents are the objects that use the source object directly or indirectly. If a metric is being used by a prompt and that prompt is being used by a report, then the prompt is a direct dependent and the report is an indirect dependent of the metric. A similar kind of search is offered by the Object Manager, if only as an indirect consequence of its use. Search by ID v2 should be easier to use for this particular feature.

Please be aware that finding and exporting recurring dependents can be a lengthy process.

SDK – DssType…

If you find yourself writing a program based on MicroStrategy’s SDK, sooner or later you will realize that although huge, the SDK documentation is not nearly sufficient.

Let’s say you are trying to write an IF/CASE statement on object.Type. Most of the time the type is self explanatory, like DssTypeAttribute or DssTypeFilter.

If object.Type = DssTypeMetric Then…

However, there are some objects for which no DssTypeXyz is defined, like Hierarchy or Transformation.
The good news is that it is quite simple to learn how MSTR stores these objects. Just go to C:\Program Files\MicroStrategy\Tutorial Reporting\TUTORIAL_METADATA_7200.mdb and open the table DSSMDOBJINFO.

Now go to the Tutorial environment of MSTR and locate an object whose type you want to learn, i.e. a Transformation. For this example I chose the Transformation “Quarter to Date”, whose Object ID is DB5E65D641D790631D8D7CA48FDB90FE. Simply search for this ID in the OBJECT_ID column of DSSMDOBJINFO and you will find that the OBJECT_TYPE is 43.

If object.Type = 43 Then…

Sometimes it pays to have a look at the SUBTYPE as well. Just to make sure your IF/CASE statement is correct, use the “Filter by Selection” button on the OBJECT_TYPE value that you identified and check if there is more than one subtype available for it.

If object.Type = 43 and object.SubType = 11009 Then…

Please note that there is no actual need for specifying the subtype for the Transformation, as there is only one available. The code above is just for emphasis purposes.

By the way, whatever you do, don’t modify anything in the TUTORIAL_METADATA_7200.mdb file, not if you still want to use the Tutorial environment…