MicroStrategy ONE

Asking for user input: Prompts

A prompt is a question the system presents to a user during report execution. How the user answers the question determines what data is displayed on the report when it is returned from your data source.

For example, an analyst in an accounting company needs a report designed to show actual revenue and forecasted revenue for his company's clients. However, the analyst does not want to see data for every corporation his company does business with; he is only interested in seeing revenue and forecasts for certain corporations and only for the current year.

The report designer can create one prompt that asks users to select which corporations they want to see data for, and another prompt that asks users what year they want to see data for. The report designer places the prompts on a report. When the analyst executes the report, he is prompted to answer these questions before the report's SQL query is sent to the data source, and as a result the report displays revenue and forecast numbers for only those corporations and the year that this analyst is interested in seeing.

A report designer can include one or more prompts in any report. Prompts are an effective tool for the report designer, because:

  • Prompts allow each user who executes the report to request individualized sets of data from your data source when he answers the prompts and runs the report. Effectively, each user creates his own filter for the report.
  • Prompts can allow the report designer to create a smaller number of reports overall, using more inclusive objects, rather than having to create numerous, more specific reports that are individualized to each analyst.
  • Prompts allow the report designer to ensure that the objects on a report are the latest available objects in the project. This is possible using a search object in a prompt. When a user launches a prompt by running a report, the search object goes through the project and retrieves the latest objects that fit the search criteria the report designer defined. Thus, no matter when the prompt was created, each time a user executes the report, the user chooses prompt answers from a list of the most up-to-date objects available in the project, including objects that may not have existed when the prompt was created.
  • Prompts allow users to keep the objects on their saved reports up-to-date, because users can save a prompted report so that the objects within the prompt remain connected to the original objects within the project that they were originally based on when the prompt was created. If objects are modified or deleted in the project, the report can reflect those changes the next time the prompted report is run.

With prompts, you can let the user decide how to restrict the data to be returned from the data source.

For information on using prompts in a report to be displayed on an Apple® iPhone® or iPad®, or an Android device, see the MicroStrategy Mobile Administration Help.

A prompt is similar to a filter (see Filtering data on a report: Filters) because a prompt determines the specific data to be displayed on a report. The difference, from a report designer's perspective, is that you create a filter for a report to provide a single, specific definition for the report. A filtered report then displays the same set of data to every user who executes that report. In contrast, a prompt dynamically modifies the contents of a report. With prompts, users can determine the objects (attributes, attribute elements, metrics, and so on) they want to be part of, or excluded from, the report query that is sent to the data source. Therefore, a prompt can be seen as a way for users to create their own filter for a given report. For example:

  • Users can choose from among several existing filters to determine exactly what filter will screen the data on the report they are about to execute. To achieve this, create an Object prompt that contains existing filters and place that Object prompt on a report. Then the user can choose which filter to apply to the report.
  • Prompts allow a report to have a dynamic report definition, which users can change each time they submit the query by choosing different answers when prompted. If you create an Attribute prompt containing the Year attribute, users are prompted to select the year for which they want the report results. The report can be run the first time by selecting 2021 and then a second time by selecting 2022.

Prompts and security filters

Security filters in MicroStrategy restrict a user's ability to access or view certain objects within a given MicroStrategy project. As a result, a security filter can limit the data a user sees on a report, even if the report is designed to display a broader set of data. For example, a report shows revenue data for all geographical regions of the U.S., but a set of users may have a security filter assigned to their MicroStrategy user accounts that limits the display of data to only the Northeast region.

For prompts, this means that users who have a security filter assigned to them may only see certain prompt answers to choose from when they execute a prompted report, even when the prompt creator has explicitly defined a broader set of prompt answers to be available to users of that report.

When describing what prompt answers will be available to users, this manual assumes that no security filter restricts an individual user's access to certain objects or object elements. However, most environments use security filters, so it is important to be aware of the potential impact of a security filter on a user's experience when answering a prompt. Consider this possibility when designing a specific prompt for your users' reporting needs.

For details on security filters, see the System Administration Help.