How to Embed Object Prompts into Document Grids

Stephanie Fisher

/ 2016-07-27

I had a requirement to create a document with object prompts. The document was essentially acting as a report builder that could be customized based on subscription. There was an additional requirement to support alias name functionality.

I found previous blog posts and TNs on how to create documents with object prompts, but I was running into challenges supporting the alias names. In addition, I noticed that when I selected a smart metric only, if its components were available in the object prompt, both the smart metric and component metric would show up on the document. The functionality differs for the dataset itself – if I ran the dataset and selected only the smart metric from the object prompt, only the smart metric would display.

The above challenges are somehow related to storing objects in the document definition and how MicroStrategy handles evaluation order with smart metrics. I found that using datasets as shortcuts on the document grids could resolve my issues with smart metrics but then alias names were not supported since they were not being stored in the document definition.

It was an accident of sorts that I ended up finding a solution. I was messing with alias names or dragging on/off objects, but I noticed that when I opened my document in Developer – object prompts were appearing on the document grid in MSTR 10.x. In previous versions (and even in 10.x with exclusive development in Developer) object prompts don’t appear on documents grid. There’s some functionality in Web that enables this to happen.

1.png

With the object prompt embedded I was able to support both alias names AND user experience with smart metrics. The document grid was behaving exactly like the dataset grid – selecting and display only the smart metric.

Leveraging the tutorial project, I created an attribute object prompt.

2.png

Also created a metric object prompt.

3.png

In Developer – I created a dataset with the object prompts. This is also a great place to set totals, auto-style, formatting, etc.

4.png

In Developer – I created a document and linked my dataset. I did NOT create a grid on the document.

5.png

Go to Web, EDIT document and select ALL objects to display in prompts.

6.png

7.png

In WEB – design mode – you’ll see on the left all your selected objects for the dataset. Drag the data set onto to the section you need the grid to appear. You must do this in web to embed the object prompts into document grids.

8.png

Here’s what your document will look like after you drag the grid on to the section.

9.png

Save and overwrite the existing copy. Object prompts answers can be cleared when saving in Developer.

10.png

Go to Developer and open your document. Object prompts will appear on the document grid, just as they appear on the dataset.

11.png

What about alias names? In Developer open the dataset for the document. Add the objects to the dataset grid and rename. This will make the alias names available in the document definition.

12.png

13.png

Go back to Web and run the document to confirm alias names. Note here that names available in the metric object prompt are the MicroStrategy Names – not the alias names. I believe there are possible work-arounds such as leveraging shortcuts or searches.

14.png

On the document, the alias names appear.

15.png

Share This Story, Choose Your Platform!

Share This Story

Drive your business forward!

iOLAP experts are here to assist you