MicroStrategy ONE

Prompts in Query Builder reports

A prompt is a MicroStrategy object that allows user interaction at report run time. You can only use element list prompts and value prompts to build you Query Builder reports.

Prompts can be used in Query Builder in the following ways:

  • Qualification prompts: You can include prompts in the qualifications of your Query Builder reports by including prompts in qualifications created in the Conditions pane (the middle pane on the right). These prompts are inserted in the WHERE or HAVING clauses of your SQL query, depending on the type of qualification they are included in. When Creating qualifications for your queries, you can insert a prompt into the Value field of the condition with the following options:

  • Select a Prompt: With this option, you can select an element list or value prompt within the project.

Depending on the type of qualification, you have the following options:

  • Prompt a Value: When creating a qualification that expects a single value to qualify on, you can create a new value prompt. This option opens up a subset of the Prompt Generation Wizard pages necessary for you to create a new value prompt.

  • Prompt Elements: When creating a qualification that expects a list of values to qualify on, you can create a new element list prompt. This option opens up a subset of the Prompt Generation Wizard pages necessary for you to create a new element list prompt.

  • Column expression prompts: You can include prompts in the column expressions you have selected and mapped to metadata in the Selections pane (the bottom pane on the right) for you Query Builder reports. These prompts are used in the SELECT clause of the SQL query. This allows you to control how data is selected and modified in the SQL statement before being returned for the resulting report.

    Prompts that are included in column expressions must already exist. In other words, you cannot create new prompts within a column expression. To include a prompt in a column expression, you must type the prompt name in the expression using the syntax: ?[prompt name]

    It is recommended that you do not include optional prompts in a column expression. Prompts that are included in the SELECT clause of a SQL query should require a prompt answer to avoid execution errors due to unanswered prompts.

Related Topic