MicroStrategy ONE

Specifying prompt information parameters in manually created link URLs

Prompt information parameters are added to manually created link URLs. They are used to pass information to answer prompts in the target report or document. Any prompt not answered by the passed information is displayed for the user to answer manually.

If you do not include any prompt information in the link URL, the target report or document is executed normally. If it contains prompts, the user is prompted to answer them.

The prompt information in a link URL can be in any of the following forms:

  • List of attribute elements, to pass attribute elements as answers to an element prompt

  • Prompt XML, to pass a collection of specific prompt answers from the source to the target

  • Message ID of the source document, to pass the prompt answers from the source document

Each is described below.

List of attribute elements

The list of attribute elements allows attribute elements to be passed to the target to answer prompts. 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, another document is executed which displays quarterly revenue and profit values for that region. You can use the following syntax to pass the attribute elements to the target by using auto text codes:

elementsPromptAnswers={&AttributeName@GUID};{&AttributeName@ElementID}

where AttributeName is the name of the attribute element, such as Region in the above example.

The auto text codes {&AttributeName@GUID} and {&AttributeName@ElementID} supply the appropriate attribute ID and the attribute element ID of the element clicked. You can either use the auto text codes to supply the IDs at run time or you can manually enter the attribute ID and attribute element ID. Manually entered codes are processed faster by the system. The syntax for manually entering the IDs is:

elementsPromptAnswers=AttributeID;AttributeElementID

A useful method to determine the attribute ID and element ID is to create a document with the desired attribute elements and type the auto text codes in a text field. You can then copy the IDs displayed in the text field into the link of your source document.

Element IDs are generated by the Intelligence Server to uniquely identify each attribute element.

To pass multiple elements from the same attribute

To pass multiple elements from the same attribute, list the element IDs separated by a comma, as shown in the following sample. You must enter the element IDs (represented by AttributeElementID) manually; the element ID auto text code can only generate one element ID at a time.

elementsPromptAnswers=AttributeID;AttributeElement1ID,AttributeElement2ID

To pass elements from multiple attributes

You can pass elements from multiple attributes by using separate parameters for each attribute, joined with an ampersand. An example using Region and Year is shown below:

elementsPromptAnswers={&Region@GUID};{&Region@ElementID}&elementsPromptAnswers={&Year@ElementID};{&Year@ElementID}

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 from the source to the target even when the message ID no longer exists, which can occur if the session is lost.

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.

Prompt XML can create a long URL, which shows up in the document when a user hovers over the link. A lengthy URL can be truncated and can produce errors. To avoid 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 guide. For details, see the Web Software Development Kit, available in the MicroStrategy Developer Library, which is part of the MicroStrategy SDK.

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 first, category prompt. If you use both prompt XML and message ID, when you click the link, the answer to the subcategory prompt is not passed to the destination. Instead, the user is reprompted for subcategory.