MicroStrategy ONE

Answer All Prompts in iOS (promptsAnswerXML)

The following parameters and values are used to pass all the prompt answers required to run a report or a document using the mobile URL API.

Parameter Value

evt

4001

Executes the report specified by either the reportID or reportName parameter

2048001

Executes the document specified by the documentID parameter

reportID

ID of the report to be executed

reportName

Name of the report to be executed

documentID

ID of the document to be executed

reportViewMode

Mode in which the report will be viewed:

  1 = Grid mode

  2 = Graph mode

  3 = Grid and graph mode

promptsAnswerXML

Encoded XML with the answer to all prompts

If the XML is not encoded, the prompt answers will not be passed.

The sample URLs below show how to pass prompt answers to a report from inside your custom mobile application. To pass answers to a document instead of a report, use the documentID parameter. MicroStrategyMobileServer is the name of your MicroStrategy Mobile Server.

Sample URL for passing prompt answers to a document in a .NET environment

Copy
Main.aspx?evt=2048001&documentID=F7CF90B7444A199D385607B516FB16C3&promptsAnswerXML=%3Crsl%3E%3Cpa%20pt%3D%227%22%20pin%3D%220%22%20did%3D%22051A61DE4598282876687088BEF55DDA%22%20tp%3D%2210%22%3E%3Cmi%3E%3Ces%3E%3Cat%20did%3D%228D679D5111D3E4981000E787EC6DE8A4%22%20tp%3D%2212%22%2F%3E%3Ce%20emt%3D%221%22%20ei%3D%228D679D5111D3E4981000E787EC6DE8A4%3A2007%22%20art%3D%221%22%20disp_n%3D%222007%22%2F%3E%3C%2Fes%3E%3C%2Fmi%3E%3C%2Fpa%3E%3C%2Frsl%3E

or

Copy
Main.aspx%3Fevt%3D2048001%26documentID%3DF7CF90B7444A199D385607B516FB16C3%26promptsAnswerXML%3D%3Crsl%3E%3Cpa%20pt%3D%227%22%20pin%3D%220%22%20did%3D%22051A61DE4598282876687088BEF55DDA%22%20tp%3D%2210%22%3E%3Cmi%3E%3Ces%3E%3Cat%20did%3D%228D679D5111D3E4981000E787EC6DE8A4%22%20tp%3D%2212%22%2F%3E%3Ce%20emt%3D%221%22%20ei%3D%228D679D5111D3E4981000E787EC6DE8A4%3A2007%22%20art%3D%221%22%20disp_n%3D%222007%22%2F%3E%3C%2Fes%3E%3C%2Fmi%3E%3C%2Fpa%3E%3C%2Frsl%3E
Copy
Main.aspx%3Fevt%3D2048001%26documentID%3DF7CF90B7444A199D385607B516FB16C3%26promptsAnswerXML%3D%3Crsl%3E%3Cpa%20pt%3D%227%22%20pin%3D%220%22%20did%3D%22051A61DE4598282876687088BEF55DDA%22%20tp%3D%2210%22%3E%3Cmi%3E%3Ces%3E%3Cat%20did%3D%228D679D5111D3E4981000E787EC6DE8A4%22%20tp%3D%2212%22%2F%3E%3Ce%20emt%3D%221%22%20ei%3D%228D679D5111D3E4981000E787EC6DE8A4%3A2007%22%20art%3D%221%22%20disp_n%3D%222007%22%2F%3E%3C%2Fes%3E%3C%2Fmi%3E%3C%2Fpa%3E%3C%2Frsl%3E

Sample URL for passing prompt answers to a document in a J2EE environment

Copy
mstrweb?evt=2048001&documentID=F7CF90B7444A199D385607B516FB16C3&promptsAnswerXML=%3Crsl%3E%3Cpa%20pt%3D%227%22%20pin%3D%220%22%20did%3D%22051A61DE4598282876687088BEF55DDA%22%20tp%3D%2210%22%3E%3Cmi%3E%3Ces%3E%3Cat%20did%3D%228D679D5111D3E4981000E787EC6DE8A4%22%20tp%3D%2212%22%2F%3E%3Ce%20emt%3D%221%22%20ei%3D%228D679D5111D3E4981000E787EC6DE8A4%3A2007%22%20art%3D%221%22%20disp_n%3D%222007%22%2F%3E%3C%2Fes%3E%3C%2Fmi%3E%3C%2Fpa%3E%3C%2Frsl%3E

or

Copy
mstrweb%3Fevt%3D2048001%26documentID%3DF7CF90B7444A199D385607B516FB16C3%26promptsAnswerXML%3D%3Crsl%3E%3Cpa%20pt%3D%227%22%20pin%3D%220%22%20did%3D%22051A61DE4598282876687088BEF55DDA%22%20tp%3D%2210%22%3E%3Cmi%3E%3Ces%3E%3Cat%20did%3D%228D679D5111D3E4981000E787EC6DE8A4%22%20tp%3D%2212%22%2F%3E%3Ce%20emt%3D%221%22%20ei%3D%228D679D5111D3E4981000E787EC6DE8A4%3A2007%22%20art%3D%221%22%20disp_n%3D%222007%22%2F%3E%3C%2Fes%3E%3C%2Fmi%3E%3C%2Fpa%3E%3C%2Frsl%3E

When you pass prompts to a report executed from outside your custom mobile application, use the syntax shown below:

Sample URL for passing prompt answers to a document from outside MicroStrategy Mobile

Copy
mstr://evt=2048001&documentID=F7CF90B7444A199D385607B516FB16C3&promptsAnswerXML=%3Crsl%3E%3Cpa%20pt%3D%227%22%20pin%3D%220%22%20did%3D%22051A61DE4598282876687088BEF55DDA%22%20tp%3D%2210%22%3E%3Cmi%3E%3Ces%3E%3Cat%20did%3D%228D679D5111D3E4981000E787EC6DE8A4%22%20tp%3D%2212%22%2F%3E%3Ce%20emt%3D%221%22%20ei%3D%228D679D5111D3E4981000E787EC6DE8A4%3A2007%22%20art%3D%221%22%20disp_n%3D%222007%22%2F%3E%3C%2Fes%3E%3C%2Fmi%3E%3C%2Fpa%3E%3C%2Frsl%3E

If you have a source document and want to pass its prompt answers to a target document, use {&PROMPTXML} directly as the URL parameter.

Sample URL for passing prompt answers from a source document to a target document

Copy
Main.aspx?evt=2048001&documentID=F7CF90B7444A199D385607B516FB16C3&promptsAnswerXML={&PROMPTXML}

When you have multiple projects configured in MicroStrategy Mobile, you can use URL parameters to execute a report in a specific Intelligence Server and project. In the absence of these parameters (server and project), the report execution is performed on the first available project in the list of projects on the Settings screen for MicroStrategy Mobile.

Generating the XML to answer all prompts (including nested prompts)

The promptsAnswerXML URL parameter passes a block of MicroStrategy-specific XML that contains all of the information needed to answer prompts. While it is not recommended, it is possible to use this parameter to automatically answer nested prompts in a URL. To do this, you capture the XML generated by MicroStrategy and then use it as the value of the promptsAnswerXML parameter in the URL.

Use the following procedure to obtain the XML for the promptsAnswerXML parameter for a specific prompted report:

    1. Add the prompted report to a Report Services document in MicroStrategy Web.  

    2. In the body of the Report Services document, add the following auto-text:  {&PROMPTXML}. This auto-text will generate the XML needed to complete the URL API call.

      promptxml1.gif

    3. Run the Report Services document and answer the prompts with the answers that you want to be passed in the URL.  

    4. When the document is executed, the XML needed to complete the URL API call will be displayed. Copy this XML and use it as the value of the promptsAnswerXML in the URL.

      promptxml2.gif