MicroStrategy ONE

Steps to add a new prompt in a Freeform SQL statement

  1. Access the Freeform SQL Editor. (How?)

  2. In the SQL statement pane (the top pane on the right), place the cursor in the SQL statement where you want to insert the prompt -generated SQL.

    The syntax around a prompt added to your Freeform SQL report depends on the type of prompt you include and where it is included in the SQL statement. While it is more common to modify the syntax around a prompt after the prompt has been inserted in the SQL statement, it is important to know these standards prior to adding the prompt. For more information on correct syntax with prompts, see How prompts are included within SQL statements.

  3. Right-click the SQL statement where you want the prompt to be placed, and select Add New Prompt. The Prompt Generation Wizard opens.

  4. In the Welcome dialog box, select either Filter definition prompt (Choose from an attribute element list) or Value prompt. Then click Next.

    Value prompts and element list prompts are the only two types of prompts that you can create for Freeform SQL reports (see Prompts in Freeform SQL reports).

  5. Follow the prompts in each dialog box to complete the process in the same way as you create any attribute element list and value prompts. For more information, see Prompt Generation Wizard.

    You can only use project attributes to create element list prompts, however, value prompts can be used with project objects or managed objects.

  6. Save the prompt. The prompt is saved as a normal object in the metadata and is inserted into the SQL statement where the cursor is positioned, displayed in pink and with brackets ([ ])around it if the prompt name contains any space.

If you made the prompt answers optional while creating the new prompt, you need to indicate which part of the SQL should be ignored when the prompt is not answered, as described in Adding an optional prompt to the SQL statement.

Related Topics