Applying Optional Data Restrictions

Objective

After completing this lesson, you will be able to Explain the Predefined Query Filter object.

Predefined Filter Definition

A filter object is a predefined Where clause that can be inserted into the Select statement inferred by objects in the query pane. Filter objects are stored in the business layer. Each folder defined in the business layer can contain a filter object.

Using filter objects has the following advantages:

  • Useful for complex or frequently used conditions.

  • Gives users the choice of applying the condition.

  • No need for multiple objects.

Using filter objects does not inherently solve the problem of conflicting WHERE clauses returning an empty data set. If a user runs a query that includes two filter objects that access the same data, the two conditions are still combined with the AND operator. The two conditions are not met, and no data is returned. However, you can solve this problem easily by changing the word AND to OR in the reporting tools .

Mandatory Predefined Filter

You may want to force a condition on users to restrict their access to part of the data set. You can make the filter object mandatory, but you then risk conflicting WHERE clauses again.

There following are the two types of mandatory filters:

  • Universe: A universe mandatory filter has no dependency on the folder to which it belongs. A universe mandatory filter is included in the query, independently of the objects (dimensions, measures, and attributes).

  • Folder: Folder mandatory filters appear only if an object of the folder is used in the query. A folder mandatory filter is triggered when users do any of the following:

    • Add an object (dimension, measure, or attribute) to the Result pane of the Query panel in Web Intelligence.

    • Add a universe pre-defined filter to the Filter pane of the Query panel. This is the case even if no object belonging to the same folder has been selected in the Result pane.

    • Create a filter with an object (dimension, measure, or attribute) that belongs to a folder with a mandatory filter.

A mandatory filter can have default values or be associated with a list of values. A mandatory filter is hidden and cannot be selected in the end user reporting tool. By default, all mandatory filters are joined in the query with the AND operator. All subfolders inherit the mandatory filters from the parent folder.

Note, however:

  • An object (dimension, measure, attribute) that references another object with the @Select function does not inherit the folder mandatory filter of the referenced object

  • A WHERE clause of an object that references another object's clause with the @Where function does not inherit the folder mandatory filter of the referenced object

  • A pre-defined filter that references another pre-defined filter or aWhere clause object where the @Where function does not inherit the folder mandatory filter of the referenced object

Create Optional Restrictions

You need to create optional data restrictions for the business users.

Log in to track your progress & complete quizzes