Skip to main content

Parameter Class

A dashboard parameter.

Declaration

export class Parameter extends TypedSerializableModel

Inherited Members

constructor

Initializes a new instance of the Parameter class.

Declaration

constructor(
    modelJson?: any,
    serializer?: DevExpress.Analytics.Utils.ModelSerializer,
    _allParameters?: ko.ObservableArray<Parameter>
)

Parameters

Name Type Description
modelJson any

A JSON object used for dashboard deserialization. Do not pass this parameter directly.

serializer ModelSerializer

An object used for dashboard deserialization. Do not pass this parameter directly.

_allParameters ObservableArray<Parameter>

Properties

allowMultiselect Property

Specifies whether multi-selection is enabled for the current parameter.

Declaration

allowMultiselect: ko.Observable<boolean>

Property Value

Type Description
Observable<boolean>

true, to allow end users to select multiple parameter values; otherwise, false.

Remarks

The following limitations apply to parameters with multi-selection enabled:

  • Use the Is any of or Is none of operators to pass a multi-select parameter to a filter criteria or to the Expression format condition.
  • Use the In or Not In operators to pass a multi-select parameter to a calculated field expression.
  • Custom SQL queries do not support multi-select parameters out of the box. For more information, refer to the following article: Use Query Parameters.
  • Stored procedures used in SQL and Entity Framework data sources do not support multi-select parameters out of the box. For more information, refer to the following article: Use Query Parameters.

Refer to the following article for more information on how to bind a multi-value parameter to a query parameter: Pass a Multi-Value Parameter Value to a Query.

See Also

allowNull Property

Specifies whether a null value can be passed as a parameter value.

Declaration

allowNull: ko.Observable<boolean>

Property Value

Type Description
Observable<boolean>

true, to allow users to pass null as a parameter value; otherwise, false.

containsDisplayMember Property

Gets whether the displayMemberName property is specified for the dashboard parameter.

Declaration

containsDisplayMember: ko.Computed<boolean>

Property Value

Type Description
Computed<boolean>

true, if the displayMemberName property is specified; otherwise, false

defaultValue Property

Specifies the parameter’s value.

Declaration

defaultValue: ko.Observable<any>

Property Value

Type Description
Observable<any>

An array of parameter values.

Remarks

You can select multiple parameter values when the allowMultiselect property is set to true.

For static and dynamic lists, use the defaultValues property.

defaultValues Property

Specifies the default parameter values for static and dynamic lists.

Declaration

defaultValues: ko.ObservableArray<DevExpress.Dashboard.Model.LookUpValue>

Property Value

Type Description
ObservableArray<LookUpValue>

An array of LookUpValue values.

Remarks

Enable the allowMultiselect property to select multiple values.

description Property

Specifies the parameter’s description displayed to an end user.

Declaration

description: ko.Observable<string>

Property Value

Type Description
Observable<string>

A string that contains the parameter’s description displayed to an end user.

Remarks

Specifies the parameter description displayed in the Parameter column of the Dashboard Parameters dialog:

Dashboard Parameter with Description

dynamicListLookUpSettings Property

Specifies look-up settings for the dynamic list.

Declaration

dynamicListLookUpSettings: ko.Observable<DevExpress.Dashboard.Model.DynamicListLookUpSettings>

Property Value

Type Description
Observable<DynamicListLookUpSettings>

A DynamicListLookUpSettings object that contains look-up settings for the dynamic list.

Remarks

The following Look-up Settings are available in the Web Dashboard:

No Look-Up
An end user specifies the parameter value in the Dashboard Parameters dialog.
Static List

An end user selects a parameter value from a static list. To add predefined parameter values, use the plus button.

The corresponding property: Parameter.staticListLookUpSettings

Dynamic List

An end user selects a parameter value defined in a data source.

The corresponding property: Parameter.dynamicListLookUpSettings

You can specify a data source as a source for dashboard parameter values. To provide access to data source values, specify the following options:

UI Settings Description API
Data Source Specifies the data source for the dashboard parameter. dataSource
Data Member Specifies the name of the data member with the parameter values for SQL and Entity Framework data sources. dataMember
Value Member Specifies the name of the data field for the parameter values. valueMemberName
Display Member (optional) Specifies the name of the data field displayed in the Dashboard Parameters dialog as a value description. displayMemberName
Sort By (optional) Specifies the data member used to sort parameter values. sortByMember
Sort Order (optional) Specifies the sort order. sortOrder

Note

You cannot use an OLAP data source as the data source for a dashboard parameter.

lookUpSourceType Property

Gets the parameter look-up editor settings.

Declaration

lookUpSourceType: ko.Subscribable<LookUpSourceType>

Property Value

Type
Subscribable<LookUpSourceType>

Remarks

The following Look-up Settings are available in the Web Dashboard:

No Look-Up
An end user specifies the parameter value in the Dashboard Parameters dialog.
Static List

An end user selects a parameter value from a static list. To add predefined parameter values, use the plus button.

The corresponding property: Parameter.staticListLookUpSettings

Dynamic List

An end user selects a parameter value defined in a data source.

The corresponding property: Parameter.dynamicListLookUpSettings

You can specify a data source as a source for dashboard parameter values. To provide access to data source values, specify the following options:

UI Settings Description API
Data Source Specifies the data source for the dashboard parameter. dataSource
Data Member Specifies the name of the data member with the parameter values for SQL and Entity Framework data sources. dataMember
Value Member Specifies the name of the data field for the parameter values. valueMemberName
Display Member (optional) Specifies the name of the data field displayed in the Dashboard Parameters dialog as a value description. displayMemberName
Sort By (optional) Specifies the data member used to sort parameter values. sortByMember
Sort Order (optional) Specifies the sort order. sortOrder

Note

You cannot use an OLAP data source as the data source for a dashboard parameter.

name Property

Specifies the parameter name.

Declaration

name: ko.Observable<string>

Property Value

Type Description
Observable<string>

A string that contains the parameter name.

Remarks

When you create and modify parameter names, follow the rules below:

  • A name can contain letters, numbers, and underscores.
  • A name cannot contain spaces.
  • A name cannot be an empty string.
  • The dashboard cannot contain parameters with the same name.
  • Names are case-sensitive. For example, you can create the names Parameter and PARAMETER.

parameterVisible Property

Specifies whether the parameter is visible in the Dashboard Parameters dialog.

Declaration

parameterVisible: ko.Observable<boolean>

Property Value

Type Description
Observable<boolean>

true, to display a parameter in the Dashboard Parameters dialog; otherwise, false.

SelectAllValue Property

Declaration

static SelectAllValue: string

Property Value

Type
string

selectAllValues Property

Specifies whether all parameter values should be selected in the initial state of the dashboard.

Declaration

selectAllValues: ko.Observable<boolean>

Property Value

Type Description
Observable<boolean>

true, to select all parameter values by default; otherwise, false.

Remarks

This option is in effect when the allowMultiselect property is enabled.

staticListLookUpSettings Property

Specifies look-up settings for the static list.

Declaration

staticListLookUpSettings: ko.Observable<DevExpress.Dashboard.Model.StaticListLookUpSettings>

Property Value

Type Description
Observable<StaticListLookUpSettings>

A StaticListLookUpSettings object that contains look-up settings for the static list.

Remarks

The following Look-up Settings are available in the Web Dashboard:

No Look-Up
An end user specifies the parameter value in the Dashboard Parameters dialog.
Static List

An end user selects a parameter value from a static list. To add predefined parameter values, use the plus button.

The corresponding property: Parameter.staticListLookUpSettings

Dynamic List

An end user selects a parameter value defined in a data source.

The corresponding property: Parameter.dynamicListLookUpSettings

You can specify a data source as a source for dashboard parameter values. To provide access to data source values, specify the following options:

UI Settings Description API
Data Source Specifies the data source for the dashboard parameter. dataSource
Data Member Specifies the name of the data member with the parameter values for SQL and Entity Framework data sources. dataMember
Value Member Specifies the name of the data field for the parameter values. valueMemberName
Display Member (optional) Specifies the name of the data field displayed in the Dashboard Parameters dialog as a value description. displayMemberName
Sort By (optional) Specifies the data member used to sort parameter values. sortByMember
Sort Order (optional) Specifies the sort order. sortOrder

Note

You cannot use an OLAP data source as the data source for a dashboard parameter.

type Property

Specifies a parameter type.

Declaration

type: ko.Computed<string>

Property Value

Type Description
Computed<string>

A string that specifies a parameter type (boolean, number, date, etc).

Remarks

The following types are available for dashboard parameters:

  • String
  • Date
  • Number (16-bit integer)
  • Number (32-bit integer)
  • Number (64-bit integer)
  • Number (floating point)
  • Number (double-precision floating point)
  • Number (decimal)
  • Boolean
  • GUID (Globally Unique Identifier)

Methods

dispose Method

Disposes of all resources associated with this Parameter.

Declaration

dispose(): void

getInfo Method

For internal use.

Declaration

getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

Type Description
ISerializationInfoArray

An array of objects that provide serialization info.

grabFrom(another) Method

Declaration

grabFrom(
    another: Parameter
): void

Parameters

Name Type
another Parameter