Table of Contents

Filters

Filters are components used for setting the data context for Settings, Worksheets, Reports, Workflows, and Data Flows.

Once a Filter is defined, it can be used by all data context-aware components in a Solution by binding the Filter to a property of the component.

A Filter is defined as a reference to table resource (Dimension, Fact, Setting, Data Store, or a View) and by a configuration describing how to read data from the table resource.

Place the selected filter in the UI by dragging and dropping it from the Toolbox in Workbook designer.

Filter


Set the properties of the filter.

Filter

Make sure that your filter will load when you open your Solution. Open Workbook Events and drag and drop an Action from the Available Actions list.

Filter

Than set the Events, Actions and Instructions of the Filter.

Filter

Show and Hide Filters

You can toggle the visibility of a filter in a Workbook on and off.

Option 1:

Specify the Is Hidden or Is Hidden Expression property in the Filter property pane. The Is Hidden Expression is a C# expression that must return true or false. If you specify an Is Hidden Expression, it will override the Is Hidden property.

Both of these properties are evaluated only once and sets the initial visibility of the filter.


Filter

Option 2:

Use the Execute Expression action of a filter to toggle its visibility on and off by using one of the following functions:

    Hide();
    HideIf(boolean expression);
    Show();
    ShowIf(boolean expression);

Filter


Filter headings


Option 1:

Use the Header or the Header Expression property in the Filter property pane. The Header property specifies the default heading of the filter. The Header Expression property is a C# expression that must return a string. If you specify a Header Expression, it will override the Header property.

Both of these properties are evaluated on the server when the Workbook is loaded. This means that you cannot use any Workbook parameters in the Header Expression, and the Header Expression is evaluated only once.


fh

The most common use case for using the Header Expression is localization.
If you want to heading of the filter to display in the language of the user, you must use the Localize(...) function in the Header Expression.

Example:

Assuming that the text code "TXT_Currency" is a registered text code in the Localization system, the following expression will display the heading to the user in their language.

Localize("TXT_Currency");

Option 2:

Use the Execute Expression action of a filter to dynamically change the heading by using one of the following instructions:

SetHeader(text: string); // Changes the header
SetHeaderSuffix(suffix: string); // Appends a suffix to the default header
ResetHeader(); // Resets the header back to the default value

fh


See Also

Videos