Creating a Selector Object
  • 13 Jun 2024
  • 6 Minutes to read
  • Dark
    Light

Creating a Selector Object

  • Dark
    Light

Article summary

This topic describes how to add a new Selector Object to a Screen or a Container and its specific properties.

To create a new Selector Object, you need to access a Screen in Design mode.

Once you're in the Screen editing page, locate the Selector Object from the Screen Objects list in the left panel, then drag and drop it onto your Screen or Container.

contents/assets/images/selector creation.gif

The Selector Object, just like every other Object, can be moved, resized, duplicated via copy/paste, and easily aligned with other Objects on the Screen.

See Configure Screen Objects for more details.

When you create a Selector Object, it is initially empty. The next step is to associate it with an Entity.

To do so, click on the Object or select the Object and click the "Configure Layout" button contents/assets/images/layout.png located in the Properties Toolbar located vertically alongside the Properties panel to the right of the Screen.

If the Multiple Data models mode is enabled on the Screen, an additional dropdown menu will allow you to select the Data model containing the Entity to be associated with the Selector.

contents/assets/images/selector.properties.panel.png

Once associated with an Entity, the Selector becomes immediately operational and can be used to apply selections right away.
See Selector properties and settings for more customization options.

Resetting a selection made on a Selector only affects the Entity associated with it and the less aggregated Entities on the same Relationship tree. Selections made on other Entities are retained.
Resetting a selection made on a Selector returns the Entity associated with it to the state defined by the Screen selection.

If you apply a selection using a Selector in Design mode and save the Screen, that selection will be the default selection applied to the Screen in Play mode when the end user lands on it. See Selection application sequence (Select at runtime) to know more about the order in which Board executes selections on each Screen. We highly recommend not to use the Selector Object and the Pager Object on the same Screen when they are associated with Entities on the same Relationship tree.

Selector properties and settings

Selector properties are available from the Object Properties panel on the right of the Screen editing page once the Object is selected.

The Object supports all options common to all Screen Objects.

Properties specific to the Selector Object are highlighted in the following image and explained below:

contents/assets/images/selector.properties.panel.more.png

Data Object properties

Under the Data tab of the Object Properties, the following options are available:

  • Selector type. Select one type of Selector from the following options:

    • Pop-up window. Click on the Selector to reveal a popup window where the user can make the desired selection

    • Vertical list. Displays a vertical list of all Entity members and allows the user to immediately make a selection with a few clicks. The row height automatically adapts to the font size applied to the member list

    • Horizontal list. Displays a horizontal list of all Entity members and allows the user to immediately make a selection with a few clicks. Selected members are highlighted with a blue underline (unless configured otherwise).
      The width of each item in the list is automatically defined depending on the member with the longest code or description
      Depending on the Selection Mode setting for both Pop-up window and Vertical list, selected members can be highlighted with a blue tick for selecting members or with a red "x" to exclude members.

  • Default tree depth (Vertical list only). For Unbalanced Entities only, the Default tree depth allows you to configure at which depth the unbalanced hierarchy tree is opened to by default. In the example below, you can see as the number increases, so does the depth view of the unbalanced hierarchy:
     contents/assets/images/selector.default.tree.depth.gif

  • Select one member only. Enable this option to allow only one member to be selected. If enabled, you won't be able to select multiple members

  • Show only active members. If you have made a selection, enable this option so that only members included in the selection available in Play mode. This option is available only if the Selection mode is set to "Include"

  • Show active counter. Shows/hides the active members counter on the "Vertical list" Selector. Example: 7/9

  • Show active percentage. Shows/hides the active members percentage bar on the "Pop-up window" Selector.

  • Selection mode. If you select "Include", only highlighted members will be included in the selection. If you select "Exclude", only non-highlighted members will be included in the selection

  • Members display. Defines which information about Entity members should be displayed: default (as configured in the Entity settings menu in the Data model), code, description, or both.

  • Show active members. Defines how active members (i.e. members included in the selection) should be displayed, grouped at the top or in their position in the list. The "Grouped at the top" option set on the "Horizontal list" Selector type will show active members "at the top" by placing them on the left side of the horizontal list

Selectors and Unbalanced Entities

Selectors are compatible with Entities of an unbalanced hierarchy.

When an Unbalanced Entity is associated to a Selector, a new section appears in the Object Properties Panel under "Data" called "Unbalanced Selection mode".  Here, makers can choose a default hierarchy selection based on the hierarchy of the members chosen by an end user in Play mode. These options are similar to the Select options for unbalanced hierarchies.

contents/assets/images/selector.unbalenced.default.selection.mode.panel.png

To configure a default hierarchy selection mode on a specified hierarchy for end users in Play mode, proceed as follows:

  1. Click on the Selector Object in Design mode so it is selected

  2. Go to the "Unbalanced selection mode" submenu from the Object Properties panel under the Data tab

  3. Select the hierarchy group you would like to choose as the default selection from the "Default selection mode" dropdown menu. The 6 options are:

    • Descendants. Selects all descendants (children) of the selected member. This option adds a few more options:

      • Include hierarchy nodes. Defines whether or not to include the levels between the selected member and the member at the maximum depth of the selection

      • Depth of selection. Defines the depth of the selection:

        • ALL. All descendants on any level will be selected

        • 1. All descendants that are 1 level away from the selected member will be selected

        • 2. All descendants that are 2 levels away from the selected member will be selected, etc.

    • Children. Selects direct descendants (children) of the selected member only. Descendants of the selected member’s descendants won’t be selected

    • Leaves. Selects leaf members that are descendants of the selected member. Nodes are excluded from the selection

    • Ancestors. Selects all parent members of the selected member, up to the root member. This option adds a few more options:

      • Include hierarchy nodes. Defines whether or not to include the levels between the selected member and the member at the maximum depth of the selection

      • Depth of selection. Defines the depth of the selection:

        • ALL. All descendants on any level will be selected

        • 1. All descendants that are 1 level away from the selected member will be selected

        • 2. All descendants that are 2 levels away from the selected member will be selected, etc.

    • Parent. Selects the direct parent member of the selected member

    • Siblings. Selects all siblings of the selected member

The “Include selected member” checkbox defines whether or not to include the selected member in the selection.
 contents/assets/images/selector.unb.select.mode.png

End users can also apply their own hierarchy select in Play mode that overrides the default selection directly from the Selector Object itself.

Interacting with the Selector Object in Design mode

In Design mode, the Selector Object provides the same interactive features available in Play mode.

The Popup window Selector offers the same options as the Select configuration window.

See Configure Screen Objects for more details.

Be aware that, if you apply a selection using a Selector in Design mode and save the Screen, that selection will be applied by default to the Screen in Play mode when the end user lands on it. See Selection application sequence (Select at runtime) to know more about the order in which Board executes selections on each Screen.


Was this article helpful?