MicroStrategy ONE

Answer Element List Prompts in iOS (elementsPromptAnswers)

The following parameters and values are used to pass element list prompt answers for executing 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

elementsPromptAnswers

Specifies the answer to a single element prompt or multiple element prompts. Each individual prompt answer is in the form of AttributeID;ElementID%5eDisplayName, where ElementID consists of two identifiers, AttributeID:value, and value can be either the element ID or description. The DisplayName for an element prompt is optional, but without it, the element name does not show up in the prompt details pane in the report page.

  • When there are multiple element prompts, each prompt answer (or group of prompt answers) is separated by a "," (comma) separator character.
  • When there are multiple answers to the same element prompt, each prompt answer is separated by a ";" (semi-colon) separator character.
  • When the DisplayName for an element prompt is included, it must be separated from the AttributeID:value by "%5e", the encoded value of the caret character ("^").:

    The caret ("^") is not a valid URL character and must be percent encoded if you follow the recommendations of the IETF. This is one of the "unsafe" characters defined in RFC1738 (which was updated by RFC3986). Previously, the caret character would not cause a problem, but many browsers will no longer allow its use.

The following example represents a URL that answers two element prompts. The URL provides three different elements to answer the first prompt and only one element to answer the second prompt:

AttrID1;ElemID1a%5eDisplayName1a;ElemID1b%5eDisplayName1b;ElemID1c%5eDisplayName1c,AttrID2;ElemID2%5eDisplayName2

Because element prompt answers are matched with prompts using the AttributeID, the order of the prompt answers does not determine the order in which prompts are answered.

The attribute element ID in the code samples below should be retrieved programmatically and not constructed manually because its structure is subject to change.

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

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

Copy
Main.aspx?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut

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

Copy
mstrweb?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut

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

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

Copy
mstr://?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut

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. 

  • Passing prompt answers for an unanswered optional element prompt

    The sample URLs below show how to execute a document by answering an unanswered optional element prompt. It specifies the AttributeID in the URL, followed by a semicolon.

    Sample URL for passing prompt answers for an unanswered optional element prompt in a .NET environment

    Copy
    Main.aspx?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F

    Sample URL for passing prompt answers for an unanswered optional element prompt in a J2EE environment

    Copy
    mstrweb?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F

    Sample URL for passing prompt answers for an unanswered optional element prompt from outside MicroStrategy Mobile

    Copy
    mstr://?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F

    Since the value passed in the URL for an unanswered optional element prompt does not include an AttributeElementID, it does not filter the results

  • Passing prompt answers for an element prompt when the attribute has a compound ID

    The sample URLs below show how to answer an element prompt when the attribute has a compound ID.

    • These URLs execute a document with one prompt. In the report, the attribute with the compound key is Distribution Center.

      Sample URL for passing one element prompt answer when the attribute has a compound ID in a .NET environment

      Copy
      Main.aspx?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:2%5eSeattle;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut

      Sample URL for passing one element prompt answer when the attribute has a compound ID in a J2EE environment

      Copy
      mstrweb?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:2%5eSeattle;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut

      Sample URL for passing one element prompt answer when the attribute has a compound ID from outside MicroStrategy Mobile

      Copy
      mstr://?evt=2048001&documentID=B9800BBC42B65FD064717BB94AF0B44B&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:2%5eSeattle;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut
    • These URLs execute a document with two prompts. In the report, the attributes with the compound keys are Distribution Center and Age Range.

      Sample URL for passing two element prompt answers when the attribute has a compound ID in a .NET environment

      Copy
      Main.aspx?evt=2048001&adocumentID=AB986D14487618F47B9704ACED385C84&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:2%5eSeattle;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut,5603951E4FE1BC04A44E44B85BBB8ED2;5603951E4FE1BC04A44E44B85BBB8ED2:1%5e24and under;5603951E4FE1BC04A44E44B85BBB8ED2:2%5e25 to 34

      Sample URL for passing two element prompt answers when the attribute has a compound ID in a J2EE environment

      Copy
      mstrweb?evt=2048001&adocumentID=AB986D14487618F47B9704ACED385C84&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:2%5eSeattle;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut,5603951E4FE1BC04A44E44B85BBB8ED2;5603951E4FE1BC04A44E44B85BBB8ED2:1%5e24and under;5603951E4FE1BC04A44E44B85BBB8ED2:2%5e25 to 34

      Sample URL for passing two element prompt answers when the attribute has a compound ID from outside MicroStrategy Mobile

      Copy
      mstr://?evt=2048001&documentID=AB986D14487618F47B9704ACED385C84&elementsPromptAnswers=54BABC8311D59D57C000B28A4CC5F24F;54BABC8311D59D57C000B28A4CC5F24F:2%5eSeattle;54BABC8311D59D57C000B28A4CC5F24F:3%5eConnecticut,5603951E4FE1BC04A44E44B85BBB8ED2;5603951E4FE1BC04A44E44B85BBB8ED2:1%5e24and under;5603951E4FE1BC04A44E44B85BBB8ED2:2%5e25 to 34