416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
Dashboard v5.0

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

Defining Validation Rules

Hide navigation
RSS
Modified on Fri, 31 Aug 2012 01:37 PM Categorized as Datasets, Filtering, KPIs
Click to return to: Documentation | Virtual Tables | Datasets | KPIs


Overview

This article shows how to define validation rules on filter values or stored procedure/function parameter values. A validation rule represents a single value or range of values that you can specify as being valid for a filter or stored procedure/function parameter. Use validation rules to:

  • Prevent virtual table/dataset columns and KPI measures/dimensions from being filtered on invalid values.
  • Ensure that stored procedures and functions always return recordsets with the same, consistent structure.
  • Limit the available choices that a user sees in a public filter on a standard or time dimension.

In order to define validation rules, you must first define a default value or range for your filter or stored procedure/function parameter. These default value(s) must also be valid as per the validation rules you want to define. For example, if you specified a default value for a filter, that value must fall within the range of one of the validation rules that you want to define; otherwise, you will not be permitted to complete the filter wizard (e.g. Finish button will be unavailable).

Validation rules also cannot be defined in the following situations. (You'll see a yellow exclamation point icon in the valadation rules wizard screen which indicates this.)

  • You have chosen the (All) and open ranges allowed for value selection option for the filter.
  • The data type of your filtered column/dimension/parameter is Boolean (i.e. bit).

Background

There are a number of wizards in the user interface of Dundas Dashboard where validation rules can be defined:


A validation rule specifying that filter values from 1 to 10 are valid.

A validation rule specifying that filter values from 1 to 10 are valid.


Difference between a filter and a validation rule

A filter is used to select the data that ultimately appears on your dashboard. If you connect a filter to a dashboard parameter and then place the parameter on a dashboard, the filter becomes user-selectable. Validation rules, on the other hand, are the limits that you place on filter choices to prevent dashboard users from selecting out of range or invalid filter values. At the dashboard level, when validation rules are in effect, users see the following:

  1. For validation rules on a dataset column filter, KPI measure/instant dimension filter, or validation rules on a stored procedure/function parameter, users see an error message if they try to make filter choices that exceed the boundaries defined by the validation rules. The error is indicated by the appearance of a yellow exclamation point icon in the top-right corner of a chart, for example. Hover over the icon with your mouse to see a tooltip explaining the error. Or, press the SHIFT key and click the icon to get the standard Application Error box which reveals more details about the error.
    A validation rule error.
  2. For validation rules on a standard or time dimension filter, the rules are used to limit the choices (i.e. dimension level members) appearing in the user-selectable filter. As an example, consider a public filter on a Product dimension that lets users select the categories: Audio and Video.
    A filter with no validation rules.
    If you additionally define a validation rule on the filter that limits the categories to Audio, the resulting user-selectable filter on the dashboard lets users select only the Audio category (or any of its sub-categories).
    A filter with a validation rule.

Adding a validation rule

Adding a single value rule

To specify a single value that is valid for your filter or stored procedure/function parameter:

  1. Click Add Validation Rule. A new validation rule (i.e. row) appears in the grid.
  2. Click the dropdown list in the fourth column of the grid and choose the equal sign operator.
  3. In the fifth column of the grid, enter the valid value for your filter or stored procedure/function parameter.

A validation rule specifying that a filter value of 5 is valid.

A validation rule specifying that a filter value of 5 is valid.


Adding a range rule

To specify a range of valid values for your filter or stored procedure/function parameter:

  1. Click Add Validation Rule. A new validation rule (i.e. row) appears in the grid.
  2. Click the dropdown list in the second column of the grid and choose a comparison operator to define the lower bound of the validation rule's range. If you want the lower bound to be unbounded, choose the -∞ < option and skip the next step.
  3. In the first column, enter the lower bound value for the validation rule's range (if applicable).
  4. Click the dropdown list in the fourth column of the grid and choose a comparison operator to define the upper bound of the validation rule's range. If you want the upper bound to be unbounded, choose the < ∞ option and skip the next step.
  5. In the fifth column, enter the upper bound value for the validation rule's range (if applicable).

A range validation rule specifying that filter values greater than or equal to 0 are valid.

A range validation rule specifying that filter values greater than or equal to 0 are valid.


Adding a validation rule on a standard or time dimension filter

When you replace an instant dimension with an existing standard or time dimension, the resulting configuration wizard lets you set up a filter and optionally define validation rules on the filter.

To add a validation rule on an existing standard or time dimension filter:

  1. Click Add Validation Rule. A new validation rule (i.e. row) appears in the grid.
  2. Click the button in the Valid Hierarchy Values column, then choose a dimension member from the hierarchy displayed in the Select value dialog.
  3. Click OK.

Adding a validation rule on a standard dimension filter.

Adding a validation rule on a standard dimension filter.


Removing a validation rule

To remove a validation rule:

  1. Select the grid row that corresponds to the validation rule you want to remove.
  2. Click Delete Validation Rule. The validation rule is removed from the grid.

Related topics


Click to return to: Documentation | Virtual Tables | Datasets | KPIs

About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2014 Dundas Data Visualization, Inc.