Select Action group
  • 11 Dec 2024
  • 6 Minutes to read
  • Dark
    Light

Select Action group

  • Dark
    Light

Article summary

This topic describes the Procedure Actions included in the Select Action group and their specific properties.

The Select Action group modifies the active Select (range or filter on the Entities’ members) defining the scope of execution of subsequent Actions.

When a Procedure starts, the range or scope of execution on the Entities is inherited from the Select and the Pager selections of the Screen from which the Procedure is launched. These inherited selections will be combined with the Procedure selections. Select Actions allows the Developer to modify the range of Entity members to include (or exclude) in the processing.

In order to replace any prior selection, add a new "Remove all selections" step or tick the option "Reset all previous selections" when adding a new "Select" step in your Procedure. See the following paragraphs for more details. If the Procedure is run directly from the Data model, the Screen selections are not carried in. The Procedure will start with a full selection instead of the Screen selections made on the Screen where it is usually triggered from.

The Screen Action group offers the following steps:

Selection

This step applies a fixed selection on Entity members, defining the range of items on which subsequent Actions are performed.

contents/assets/images/selectiondb.B14.png

  • If enabled, the "Reset all previous selections" option resets any previous selection so that the selection made is not nested in previous selections but replaces them completely

  • If enabled, the "Run as Administrator" option allows Developers to apply a selection outside the scope determined by the security settings specific to the user who started the Procedure
    For example, if a user can only make selections on the member "Cost Center A" as per his security settings, this option allows to apply a selection on another cost center or on all cost centers in order to allocate an expense or revenue to a cost center on which the user cannot make selections. This option can only be enabled by users with administrative rights to the Data model (i.e. the "Access mode" property in the Data model security profile must be set to "Database administrator").

    Once enabled, the "Run as Administrator" option remains active in subsequent steps until a step involving user interaction is executed: when this happens, the security selection for the user is considered again. The Procedure Debugger is considered as a step which involves user interaction, so when a breakpoint stops the Procedure and the Watch Window appears, the "Run as Administrator" option is disabled and the security selection for the user is considered again.

Interactive selection

This step pauses the Procedure and invites the user to make a choice of members on the selected Entity. Select "All" to allow the user to select any Entity from those he has access to.
If enabled, the "Select one member only" option allows the user to select only 1 member of the configured Entity.
You can also choose which Entity member information should be displayed: code, description, or both.

If the user closes the Select window, using the "CANCEL" button or the "X" icon, the Procedure execution ends.

contents/assets/images/interactiveselectiondb.B14.png

Select Entity based on Cube

This step selects the members of an Entity if values in a specific Cube are different from zero. This step can be used to create analysis which require nesting multiple queries such as target groups or cross-selling analysis: in this case, for example, you can select one or more products to identify which customers bought them and then identify which other products these customers bought.

Example
If you have a Cube named "Sales" which has the Entity "Customer" in its Structure, you can configure the step so that it selects only the members of the Entity "Customer" if  the Cube "Sales" has non-zero values in its combinations (cells) that involve members of the Entity "Customer".
To do so, you have to select the Entity "Customer" from the Entities dropdown menu and the Cube "Sales" from the Cubes dropdown menu.
contents/assets/images/selectentitybasedoncubedb 1.png

The Cube values which determines the selection on the chosen Entity is evaluated within the selection that is active at that time on the Procedure.

Example
If a previous applied selection on the Entities "Month" and "Product" is active and you want to configure a "Select Entity based on Cube" step on the Entity "Customer"  based on the Cube "Sales" (dimensioned by "Customer", "Product", and "Month"), the step will select all customers for which, within the previously chosen months and products, the value in the Cube "Sales" is different from zero.

The "Run as Administrator" option works as described in the "Selection" step. The "Keep mode", if enabled, intersects the result of the step with the selection active at that time on the Procedure for the selected Entity.

Apply selection to Screen (available only for Capsule Procedures)

This step applies the currently active selection to the currently open Screen. This step is usually followed by a "Refresh Screen" step in order to refresh the Screen Objects and display the effect of the applied selection.contents/assets/images/apply selection to screen.png

Remove all selections

This step removes all previously applied selections. It is equivalent to clicking the "Reset All" button of the Select window.
contents/assets/images/removeallselectionsdb.B14.png
The "Run as Administrator" option, in this case, resets the select to the entire set of Entities in the Data model, even if the user who triggered the Procedure has limitations on the selectable members due to his security settings.

The "Reset whole selection" option removes all selection from all Data models associated with the Screen the Procedure was triggered from. This option is useful in case of Screens associated with multiple Data models

Remove selections on Entity

This step removes any active selection on the chosen Entity. The "Run as Administrator" option works as described in the "Selection" step.contents/assets/images/removeselonentitydb.B14.png

Remove selection on tree

This step removes any active selection on the chosen Relationship tree (i.e. all active selections will be removed from all Entities belonging to it). The "Run as Administrator" option works as described in the "Selection" step.
contents/assets/images/removeselontreedb.B14.png

Reset to current Screen

This step resets the state of the selection as it was when the Procedure was launched except when the Procedure includes one or more "Apply selection to Screen" steps; in this case, the Screen will be reset to the selection applied by the last "Apply selection to Screen" step.
contents/assets/images/resettocurrscreendb 1.png

Save current selection

This step temporarily saves (in a variable of the Procedure) the state of the current selection with a name so that the Developer can restore it later in the Procedure. Note that all states saved by this step are treated as local variables of an instance of the Procedure, meaning that they are created when the Procedure starts and destroyed when the Procedure ends. Two parallel instances (executions) of the same Procedure do not share these variables.
contents/assets/images/savecurrselectiondb.B14 (1).png

Restore selection

This step restores a previously saved state of the selection in the same instance of the Procedure.
contents/assets/images/restoreseldb.B14.png

Apply selection to Block (available only for Capsule Procedures)

This step applies a selection as a "Refer to" function to a specified Data Block of a Layout in a Screen of the currently open Capsule.
To configure this step, proceed as follows:

  1. Select a Screen from the "Screen" dropdown list. All the Layouts contained in the selected Screen will be listed in the "Layout" dropdown list

  2. Select a Layout from the "Layout" dropdown list. All the Data Blocks contained in the selected Layout will be listed in the "Block" dropdown list

  3. Select the desired Data Block from the "Block" dropdown list. The "Refer to" function will be automatically enabled on the selected Data Block and the Entity members of the currently active selection will be passed as Block reference.contents/assets/images/apply selection to block.png

    A Dynamic Selection cannot be applied using this step.

In the case of a Capsule Procedure, a Data model dropdown menu allows you to select the Data model on which the Procedure step will be executed, except in cases where the Procedure step has specific options that act on other Data models (for example, the "Save Pending Changes to Disk" step in the "Advanced Action Group" can be configured to act on all Data models or only on the Data model where the Procedure resides).


Was this article helpful?