MicroStrategy ONE
Prompt information parameters
Before you begin
The variable described below is a part of a manual link URL. For an overview of creating link URLs manually and a complete procedure, see Creating link URLs manually.
If you do not include prompt information, the target report or document is executed normally. If it contains prompts, the user must answer them as usual. However, you can pass information to be used as prompt answers into the target. Any prompts not answered by the passed answers information are displayed for the user to answer manually.
Prompt answers can be in any of the following forms:
-
List of attribute elements, to pass attribute elements as answers to an element list prompt
-
Prompt XML, to pass a collection of specific prompt answers to the target
-
Message ID for the source document, to pass the prompt answers from the source document
List of attribute elements
The list of attribute elements allows attribute elements to be passed to the target. For example, a document contains a list of regions and their yearly revenues. Each region is a link that passes the region's name to a target document. When a user clicks a particular region in the document in MicroStrategy Web, another document is executed which displays quarterly revenue and profit values for that region. The format for such a list is:
elementsPromptAnswers=Attribute;{
Replace Attribute with the attribute ID or the auto text code {&AttributeName@GUID}. The auto text code supplies the attribute ID at run time when you replace AttributeName with the attribute name. While the attribute name is easier to read and use, the attribute ID is processed more efficiently.
Replace AttributeName with the name of the attribute element, such as Region in the example above. The auto text code {&AttributeName@ElementID}supplies the attribute element ID at run time; alternatively, you can manually enter the element ID instead of using the auto text code. Element IDs are generated by the Intelligence Server to uniquely identify each attribute element. For more information, refer to the Web Software Development Kit, available in the MicroStrategy Developer Library, which is part of the MicroStrategy SDK. In the Web SDK, information on attribute element IDs is located in the API Reference, on the Classes page under
Another method to determine the element IDs is to create a document with the desired attribute elements and {&AttributeName@ElementID}auto text codes. Copy the element IDs into the links of your source document.
A sample syntax for the example follows:
elementsPromptAnswers={Region@GUID};{
To pass multiple elements from the same attribute, list the element IDs separated by a comma, as in the following sample. Note that in this scenario you have to enter the element IDs (represented by AttributeElementID) manually; the element ID auto text code can only generate one element ID at a time.
elementsPromptAnswers=Attribute;AttributeElement1ID,AttributeElement2ID
You can also pass elements from multiple attributes by using a separate elementsPromptAnswers parameter for each different attribute. As with other parameters, join them with an ampersand, that is, &. An example using Region and Year follows.
elementsPromptAnswers={Region@GUID};{
Adobe's HTML parser conforms to a very strict syntax. If this syntax is not followed, the parser breaks and does not display the intended attributes. For more information on the syntax, see http://livedocs.adobe.com/flex/201/langref/flash/text/TextField.html#htmlText.
Prompt XML
Prompt XML represents prompt answers in an XML format. It incorporates dynamic information from the executed source document into the XML string. Prompt XML is useful because it enables prompt answers to be maintained even when the message ID no longer exists, which can occur if the session is lost, for example.
The XML cannot be applied unless the prompts in the target are the same physical prompt objects with the same IDs as the prompts in the source document. If the prompts are contained in filters, use links to filters instead of embedded filter prompts. For more information on links to filters, see the Advanced Reporting Help.
Prompt XML can create a long URL, which shows up in the document when a user hovers over the link. A lengthy URL could also be truncated and could produce errors. To resolve this issue, use the document message ID described below if the MicroStrategy session remains open.
The format for prompt XML is:
promptsAnswerXML={PROMPTXML}
The auto text code {&PROMPTXML} generates the appropriate XML string at run time. You can also manually code the prompt XML, but the format and usage of prompt XML is beyond the scope of this manual. For more information, refer to the Web Software Development Kit, available in the MicroStrategy Developer Library, which is part of the MicroStrategy SDK. In the Web SDK, information on prompt XML is located in the API Reference, on the Classes page under WebPrompt.
Message ID
The message ID uniquely identifies an instance of a report, document, or HTML document. If different users execute the same report, different instances and therefore different message IDs are produced. The message ID allows you to pass the prompt answers from the source document to the target. The format is:
originMessageID={DOCUMENTMESSAGEID}
The auto text code {&DOCUMENTMESSAGEID} supplies the correct message ID at run time.
You can combine prompt XML and message ID, as long as the destination does not contain nested prompts. If both parameters answer the same prompt, the prompt XML parameter takes precedence over the message ID.
A nested prompt is where the definition of one prompt depends on the answer to another prompt. For example, the first prompt is for category, and the second is for subcategory. The list of subcategories for the second prompt depends on the answer to the category prompt. If you use both prompt XML and message ID in this case, when you click the link, the answer to the subcategory prompt is not passed to the destination. You are reprompted for subcategory.