Automatically Answer Prompts

Date: 18-08-2011
Author: Bit Software

MicroStrategy offers a lot of built in manipulations that can be performed directly within the URL. This can provide a lot of benefits for seamlessly linking to MicroStrategy reports from either within MicroStrategy itself or from an external system.
The URL API may sound complicated, but its actually really simple and doesn't require any actual programming or extra licenses. This makes it the ideal tool to perform some neat tricks and even some basic "free" customizations.
Before you can start modifying the URL for a report or document, you must first obtain it. DO NOT ever take the URL out of your address bar. This usually contains extra information that's specific to your current session, or it's missing crucial information that is already stored in your session.
Once you've got the base URL, you can start adding/modifying it. The most common task to perform is to automatically answer Prompts. This is useful when linking to reports or documents from an existing report or document and you want to automatically answer some or all of the prompts based on previous knowledge, either because you know what the user clicked on or you know what the user previously answered.
There are 5 built in methods for answering prompts:

  • valuePromptAnswers

  • objectsPromptAnswers

  • elementsPromptAnswers

  • originMessageID

  • promptsAnswerXML

The ones you'll most commonly use will be elementsPromptAnswers and valuePromptAnswers. The other's have their use too, and while they'll all arrive at the same end result, there are situations where only one or some will work.

by Bryan Brandow

(This article was first published on Bryan`s MicroStrategy Blog)