Creating and Using Parameters

Objectives

After completing this lesson, you will be able to:

  • Use Parameters in Data Restrictions

Parameters

A parameter is a variable in the Business Layer or the Data Foundation that requires a value at runtime. A parameter can have two input types:

  • User input as a response to a prompt. The prompt is a question or directive that requires a user to set one or more values to restrict a result set.

  • Predefined input that specifies a fixed value for the parameter at runtime.

Parameters are defined as individual components in a business layer or data foundation, and are available to all objects in the business layer.

You use parameter objects in the SQL or MDX definition of an object to prompt a user response, or to implement a fixed value response to a query.

Note

Parameters inserted in the data foundation are inherited by any business layer based on the data foundation. These parameters cannot be edited in the business layer. You edit the parameters in the data foundation.

The following properties are available for parameters:

PropertyDescription

Prompt to users

If checked, the user is prompted to enter a value at runtime. If cleared, a predefined value is entered at runtime for the parameter.

Prompt Text

The text for the prompt question or directive if Prompt to users is checked.

Set values

Available when the Prompt to users check box is unselected. Lets you enter one or more values to be used for the parameter at the runtime.

Data Type

The data type required for the answer to the prompt.

Allow multiple values

If checked, lets the user select multiple values from the list of values.

Keep last values

If checked, the last value chosen by the user is kept when the prompt is rerun.

Index aware prompt

If checked, the key column is included in the prompt to restrict the values in a list. The key column is not visible to the user.

Associated list of values

A list of values to provide values for the prompt.

Select only from list

If checked, the user is forced to select a member in the list.

Set default value

Lets you select values to be used as default.

Create and Use a Parameter

Watch how to create and use a parameter in this short video.

Create and Use Parameters

Create parameters and use them in the business layer.

Log in to track your progress & complete quizzes