MicroStrategy ONE

Determining how the target of a selector displays: current state

Before you begin

You should be familiar with the various properties that define how a selector looks and what it controls, such as target and source. See Defining selectors for descriptions. You should also know the difference between a slicing selector (which calculates the data for all available selector items in advance) and a filtering selector (which calculates the data for a selector item only when it is requested by a user). For a more in-depth comparison, see Applying selections as filters or slices.

By default, when a filtering selector is first displayed in MicroStrategy Web, none of the selector items are selected, so the selector's target displays all of the available items (all the regions, for instance, if the selector's source is Region). If the selector slices rather than filters the data, by default the first item in the target is selected in the selector, and its target displays data for that item (for example, Central, if the source is Region).

Selector items are the elements that are listed in the selector. The user selects an item to update the target panel, Grid/Graph, or other selector.

A user can make selections in the selector, which updates the target. If the user does not save the document, when the document is re-executed, the selector and target are displayed according to the default (all data for a filtering selector, the first item for a slicing selector). If the user saves the document with his selections, when the document is re-executed, the selector and target are displayed according to those selections.

You can change these defaults by using the Current State setting to define how a slicing selector and its target are first displayed. You can define the Current State to display all items in the target or only a specific number of items. When a user saves the document after selecting items in the selector, the Current State setting is Set to Specific Elements (the ones that the user specified).

A filtering selector always displays as unset (all items are displayed) until a user saves the document after selecting items, when theCurrent Statesetting isSet to Specific Elements(user-specified).

For both slicing and filtering selectors, you cannot set the Current State to Set to Specific Elements; this state only occurs when a user saves the document with updated selections.

You can define the Current State only for selectors that target attribute elements on Grid/Graphs or panel stacks (See Creating selectors for elements on Grid/Graphs or Creating selectors that update dynamic text fields on panel stacks for descriptions). Since selectors work only in MicroStrategy Web, this setting is applied only in MicroStrategy Web.

For a more detailed description of the various Current State options, see Defining the current state of a selector below. For examples of the Current State setting in a slicing selector, see Current State setting with a slicing selector below. For examples of the Current State setting in a filtering selector, see Current State setting with a filtering selector below. (Slicing selectors and filtering selectors are discussed separately because they have different Current State options.) For examples of the Current State settings used with multiple targets, see Current State settings and multiple targets.

For a procedure to define the current state setting, see To determine how the target of a selector displays below.

Current State setting with a slicing selector

For example, a document contains a Grid/Graph and a slicing selector that targets the Grid/Graph. The Region attribute is the source of the target. By default, the selector's current state is defined to display the first selector item.

When the document is executed in MicroStrategy Web, the check box for the first region, Central, is selected in the selector, so the target Grid/Graph displays data only for the Central region, as shown below:

In the selector, a user selects the Mid-Atlantic and Northeast check boxes, and clears the Central check box. Now only Mid-Atlantic and Northeast are displayed in the Grid/Graph. The user closes the document without saving it, then re-executes the document. As defined by the selector's Current State setting, Central is once again selected in the selector and displayed in the target.

As before, the user selects the Mid-Atlantic and Northeast check boxes, and clears the Central check box in the selector. Mid-Atlantic and Northeast are displayed in the Grid/Graph. This time, the user saves the document before closing it, then re-executes it. The Grid/Graph displays the Mid-Atlantic and Northeast data, with Mid-Atlantic and Northeast checked in the selector, as shown below:

When the user saved the document, the selector's state was saved and therefore it automatically changed the Current State setting to Set to specific elements. This allows the user's selector choices to be displayed when the document is re-executed.

If desired, you can reset the Current State property of the selector, so that it once again automatically displays the first region when the document is executed. To do this, define Current State as Use first, and set Number of Elements to one.

You can enter any number of elements. You can also define the Current State to display all the elements or to display the last number of elements, then specify the number of elements to display.

Current State setting with a filtering selector

A document contains a Grid/Graph and a filtering selector that targets the Grid/Graph. The Region attribute is the source of the target, and the selector filters the target. By default, the selector's Current State is defined as unset. This means that the target Grid/Graph is unfiltered and therefore displays all the regions.

When a user executes the document in MicroStrategy Web, all of the regions are displayed in the target Grid/Graph, as shown below. Notice that none of the check boxes in the selector are selected, since the selector state is unset.

The user selects Central in the selector. The Grid/Graph updates to display the data for the Central region only.

The user closes the document without saving it, and then re-executes it. The selector's Current State is still set to the default setting of Unset, which means that all the regions are displayed in the target Grid/Graph.

The user then selects the Central check box again, so that the data for the Central region is displayed in the Grid/Graph. The user saves the document before closing it. When the user re-executes it, the Grid/Graph displays the Central data, with Central checked in the selector, as shown below:

This time, because the user saved the document, the selector's state was saved and therefore it automatically changed the Current Statesetting toSet to specific elements. This allows the user's selector choices to be displayed when the document is re-executed.

If desired, you can reset the Current State property of the selector, so that it once again displays all regions. To do this, define Current State as Unset (no filter).

Current State settings and multiple targets

If a selector has multiple targets, the selector display is affected by whether all the targets contain the same elements. If they do not, the Current State settings are applied differently.

For example, target Grid/Graphs can contain different elements if one Grid/Graph has a view filter. A document contains two Grid/Graphs. The Employee Revenue Grid/Graph contains the Region attribute, Employee attribute, and Revenue metric. The Regional Revenue Grid/Graph contains the Region attribute and Revenue metric. Both Grid/Graphs are targeted by a selector. Both Grid/Graphs contain the same elements. A view filter is applied to the Regional Revenue Grid/Graph, to exclude Central. Now the Grid/Graphs contain different elements, since Employee Revenue includes the Central region and Regional Revenue does not.

For a slicing selector, the default Current State displays the first element in the targets, with the first element selected in the selector. Both Grid/Graphs display data for the Central region. If the targets contain different elements, the first element for each target is displayed: Central in the Employee Revenue Grid/Graph and Mid-Atlantic in the Regional Revenue Grid/Graph. Because the displayed elements are different, no item is selected in the selector, as shown below:

For a filtering selector, the default Current State displays all the elements in the targets, with no element selected in the selector. Both Grid/Graphs would display data for all the regions. If the targets contain different elements, each target still displays all its elements, but Regional Revenue does not contain Central, as shown below:

Defining the Current State of a selector

The state of a selector is controlled by the Current State and Number of Elements properties, as described below.

  • For a slicing selector, the following scenarios are possible:

  • The target displays the first Number of Elements (that is, selector items). For example, if the selector source is Region and Number of Elements is defined as two, the first two regions (Central and Mid-Atlantic) are displayed.

    To do this, setCurrent State to Use firstand specify theNumber of Elements.

  • The target displays the last Number of Elements (that is, selector items). For example, if the selector source is Region and Number of Elements is defined as one, the last region (Web) is displayed.

    To do this, set Current State to Use last and specify the Number of Elements.

  • The target displays data for all the items in the selector.

    To do this, set Current State to All.

  • When a user chooses items in the selector, the target displays the selected items. When the user saves the document with his selections, Current State is automatically switched to Set to specific elements.

    Current Stateis automatically defined asSet to specific elements; you cannot select this option.

  • For a filtering selector, the following scenarios are possible:

  • The target is not filtered and therefore displays data for all items in the selector. In the selector, none of the selector items is selected. A drop-down list will have blank space, a button bar will not have any buttons selected, no radio buttons will be selected, and so on.

    To do this, set Current State to Unset (no filter).

  • When a user chooses items in the selector, the target displays the selected items. When the user saves the document with his selections, Current State is automatically switched to Set to specific elements.

    Current State is automatically defined as Set to specific elements; you cannot select this option.

Prerequisites

The following procedure assumes that the document contains:

To determine how the target of a selector displays

  1. Open the document in the Document Editor. (How?)

  2. Right-click the selector to modify and choose Properties. The Properties dialog box opens.

  3. Click the Selector tab.

  4. Select one of the following options from the Current state drop-down list:

    • If Apply selections as a filter is cleared (that is, the selector slices data):

    • To display the first Number of Elements, select Use first. For example, if the selector source is Region and Number of Elements is defined as two, the first two regions (Central and Mid-Atlantic) are displayed.

    • To display the last Number of Elements, select Use last. For example, if the selector source is Region and Number of Elements is defined as one, the last region (Web) is displayed.

    • To display data for all the items in the selector, select All.

    • If Apply selections as a filter is selected:

    • To display data for all items in the selector, select Unset (no filter).

    When a user has chosen items in the selector, Set to specific elementsis selected automatically. The target displays the items that the user chose in the selector. This option is shown only when a user has chosen selector items, and is available for both filtering and slicing selectors.

  5. If Current state is set to either Use first or Use last, type the number of elements to display in the Number of Elements field. For example, if the selector source is Region, Use last is selected, and Number of Elements is defined as one, the last region (Web) is displayed.

  6. Click OK to return to the document.

Related topics