Print      Open PDF Version of Online Help


Previous Topic

Next Topic

Adding Variable Prompts in Analytics

A variable prompt allows users to select a value from a set of values that you specify in the prompt. There are two types of variable prompts:

  • Presentation Variable. A presentation variable prompt can be used in a formula or a filter.
  • Request Variable. A request variable prompt can be used to override the value of a session variable for the duration of a request initiated from the prompt. If a request variable that has the same name as a system variable exists in an analysis, then the value of the system variable is overridden by the value that the user selects in the request variable prompt. However, the selected value of the request variable is in effect only from the time the user presses the Go button for the prompt until the analysis results are returned.

    NOTE: Certain system session variables cannot be overridden.

A variable prompt is not dependent upon a column, but can use a column. The set of values in a variable prompt can be one of the following:

  • Custom values
  • All values from a column
  • Specific values from a column
  • Values in a saved group
  • Values returned by an SQL statement that you specify

As an example of a variable prompt that uses custom values, you might want to allow users to see the revenue values after applying various levels of discount. To do this, you can create a presentation variable prompt and specify the values as 10, 15, and 20 percent. Then you create a new column in the analysis and enter the formula Revenue multiplied by the variable that you specified.

As an example of a variable prompt that uses values from column, you might create a presentation variable prompt that uses the values of the Sales Stage column, and then create a filter in the analysis that uses the variable to filter on the selected sales stage. A variable prompt that uses the values of a column acts in the same way as a column prompt. However, variable prompts have the advantage that you can create multiple variable prompts using the values of the same column, whereas you can create only one column prompt for a given column.

To add a variable prompt

  1. In the Prompts tab of the analysis editor, click the New icon, and then select Variable Prompt.
  2. In the New Prompt dialog box:
    1. In the Prompt for field, do one of the following:
      • Select Presentation Variable and then enter a name for the variable.
      • Select Request Variable and then enter the name for the variable. The name must be exactly the same as the name of the session variable whose value you want to override.
    2. Enter an appropriate label for the prompt, and optionally enter a description.

      The label appears beside the prompt field at runtime.

    3. In the User Input drop-down menu, choose a method for the user to select a value to filter by.
    4. If you selected either the Choice List, Check Boxes, Radio Buttons, or List Box user input type, then specify or select the values for the variable.
    5. In the Options section of the dialog box, specify the options for the variable prompt.

      The options vary depending on what you selected in the User Input field.

    6. When you finish defining the prompt, click OK to close the dialog box.
  3. Save the analysis.

Published 6/21/2021 Copyright © 2005, 2021, Oracle and/or its affiliates. Legal Notices.