Passing multiple selections to prompt

Hello there!

Today let’s talk about how to pass multiple selections to a prompt answer. I don’t know if you already tried to pass multiple values from a checkbox selector, for example, to another document/report, that not possible. You need to use URL API and answer a prompt to accomplish that.

So, to do that, you have to:

1. Create an element prompt in a report (you can create another kinds of prompt, if you want);

pic1

2. Create a non-prompt report;

pic2

3. Create a document using the non-prompt report;

pic3

4. Create a multiple selector using the check box selector, for example;

pic16

5. Create a panel stack and insert an html container inside of it;

pic5

pic6

6. Save your document and open it in MicroStrategy Web in Interactive Mode;

pic7

I always remove the title bar to help the next step. To do that, just edit the selector and in General tab, uncheck the Show title bar option:

pic8

7. Get the ID of the <span> tag. To do that, I prefer Firefox or Chrome browser. You just have to right click on the check box selector, select INSPECT ELEMENT and look for it’s <span> tag and copy the ID.

There is a pattern, first a <span> then a <div> and then a <div>, just like the image below:

pic9

In that case, the ID is K46.

<span id="K46" ty="obj" rl="3" sec="-1" name="K46" class="K46" slid="0" sty="111" sos="-1">

8. Get the link of your report/document with the prompt;

Just right click on the report/document that has the report prompt, click on Share and click on Show link. Copy that link.

pic1- pic11

In my case the link is:

http://FELIPE/MicroStrategy/asp/Main.aspx?evt=4001&src=Main.aspx.4001&reportID=1A8E595D4A765687E8DA5484F7EAFCFF&visMode=0&reportViewMode=1&server=FELIPE&Project=MicroStrategy%20Tutorial&port=0&share=1

9. Copy the link and insert one of the parameters below at the end of your link:

Parameters:

elementsPromptAnswers={&AttributeName@GUID};{&CurrentSelectionElementID:IDofSpan&}

or
elementsPromptAnswers=AttributeID;{&CurrentSelectionElementID:IDofSpan&}

10. The link should be like this:

http://FELIPE/MicroStrategy/asp/Main.aspx?evt=4001&src=Main.aspx.4001&reportID=1A8E595D4A765687E8DA5484F7EAFCFF&visMode=0&reportViewMode=1&server=FELIPE&Project=MicroStrategy%20Tutorial&port=0&share=1&elementsPromptAnswers={&[Call Center]@GUID};{&CurrentSelectionElementID:K46&}

or

http://FELIPE/MicroStrategy/asp/Main.aspx?evt=4001&src=Main.aspx.4001&reportID=1A8E595D4A765687E8DA5484F7EAFCFF&visMode=0&reportViewMode=1&server=FELIPE&Project=MicroStrategy%20Tutorial&port=0&share=1&elementsPromptAnswers=8D679D3511D3E4981000E787EC6DE8A4;{&CurrentSelectionElementID:K46&}

To get the ID of the attribute, just go to Developer/Desktop -> Right click on the attribute -> Properties and copy the ID value:

pic12

11. Now just insert an <a> tag to your link like this:

<a href=”http://FELIPE/MicroStrategy/asp/Main.aspx?evt=4001&src=Main.aspx.4001&reportID=1A8E595D4A765687E8DA5484F7EAFCFF&visMode=0&reportViewMode=1&server=FELIPE&Project=MicroStrategy%20Tutorial&port=0&share=1&elementsPromptAnswers=8D679D3511D3E4981000E787EC6DE8A4;{&CurrentSelectionElementID:K46&}target=’_blank’>Link</a>

Where:

target=’_blank’  – is responsible to open this link in a new window. If you don’t need that, just remove this parameter.

Link – Is the name that is going to be displayed in your HTML Container.

12. Double click on your HTML Container and paste the link with the <a> tag;

pic13

12. Run your dashboad in interactive mode, for example, and choose more than one element in the selector.  Click on the link!

pic14

Your report should be like this:

pic15

 

Hope it helps!

God bless you!

 

13 thoughts on “Passing multiple selections to prompt

  1. Reinaldo Vitorino

    Bom dia Vilela,
    Parabéns pelo artigo, ficou muito bom.
    Gostaria de saber se tem como passar apenas os IDs na URL e no prompt details do relatório mostrar a descrição daqueles IDs.
    Abçs…

    Like

    Reply
    1. Felipe Vilela Post author

      Bom dia Reinaldo, é possível criar um prompt do atributo pelo id e passá-los pela URL. No prompt, basta colocar um atributo que contenha os descritivos. Muito obrigado pelo contato. Abs, Felipe Vilela

      Like

      Reply
  2. Durjoy Basu Ray

    Thank You so much for this post. This really helped me out. I had the exact scenario, but had multiple element prompts to pass.

    Liked by 1 person

    Reply
  3. Vidya

    This is working only for selectors or other objects. But is it possible to get the selected attributes values of the interactive bubble grap?

    Like

    Reply
  4. mstrmstr

    I have p1 page. I want to call page p2.there is a button in o2 click of which is loading a dashboard. Now i want to do button click operation from p1 automatically. We cannot bypass p2 and directly call dashboard. We want to go via p2. Plz share if any ideas..

    Like

    Reply
    1. Felipe Vilela Post author

      Hello there,

      I don’t know if I understood, but what you want is to open a “waiting dashboard”, right? You can add an HTML container with a javascript with a timer to lead you to the p2 dashboard after a few seconds. Is that what you want?

      Like

      Reply
  5. Ryan Wagner

    Hi,

    I have a unique question regarding passing multiple selector values to another document. Can we choose multiple selector values on Doc A, and send them over to 3 different drop-down selectors on Doc B? The use case is to send/link Doc A’s element values to Doc B (Comparison Dashboard), where the user then compares three stores to each other on Doc B. Thank you.

    Like

    Reply
    1. Felipe Vilela Post author

      Hi Ryan,
      You can use URL API or links to do that. Using URL API, you just have to add this parameter prevMsgID={&DOCUMENTMESSAGEID} in your URL. So it would be something like:
      ./mstrWeb?evt=2048001&src=mstrWeb.2048001&visMode=0&currentViewMedia=1&documentID=123751234CE70080EF95E0FC&server={&SERVERNAME}&Project={&PROJECT}&prevMsgID={&DOCUMENTMESSAGEID}

      Using links, you just have to click on the “Edit links…” and set to the “pass all selector values” field, “Match selector by source attribute”.
      Thank you

      Like

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s