Top.Mail.Ru
Open View
CTRL+K

Open View

In this article
  • Open View
  • Example of Opening an Existing View
  • Example of Opening a Script-Generated View
  • Click Action in YAML

Use this action in Browse mode to open a view: empty, existing, or script-generated.

You can open the current dashboard’s view in the following locations:

  • Window (selected by default. Replaces the home view in the current window)
    • Open in new window switch (opens the view in a new browser tab)
  • Side panel
    • Alignment (left or right on screen)
    • Action Buttons
  • Modal window
    • At click location (in Browse mode, the modal window with the view appears near the last click position)
    • Action Buttons
  • Placeholder (the view opens inside the selected placeholder)

Open view

For the Open view click action, configure parameters for all input values, if they are defined in the settings of the view being opened.

Configuring incoming parameters

When opening a script-generated view, you may need to configure parameters. Use the following input methods: Column, Variable, Formula, or Set by aggregation.

Note
  • When using the Formula input method, the system passes the computed value of the formula, not the formula itself.
  • For the Formula and Set by aggregation input methods, use aggregation formulas with a limit value of 1.
  • In a placeholder, only the Variable and Set by aggregation input methods are available when configuring parameters for a script-generated view.

When opening a view in any window type in Browse mode, the view inherits filters from the source view.

When opening a view in a side or modal window in Browse mode:

  • If the opened view contains a Filter widget, you can apply it
  • Predefined filters apply to the opened view if configured for its widgets
  • You can use click filtering in the opened view if its filter mode is set to Single choice. To clear the click filter, click the selected value again

Consider the following limitations, when configuring the click action:

  • A view cannot display itself inside its own placeholder.
  • If a script returns an empty view to a placeholder, the placeholder hides in Browse mode but remains visible in Edit mode.

Example of Opening an Existing View

  1. The workspace Data Model includes the sales_case_table_customer_experience_v3 table containing information about sales in various countries. The country column specifies the countries in which the sales took place.
  2. A dashboard exists with two views: Overview and Order Status Distribution.
  3. The Order Status Distribution view contains a Donut Chart showing various order statuses and an input value named Country. Existing example screenshot 2 The default value uses the formula: any("sales_case_table_customer_experience_v3"."country").
  4. To use the input value as a filter, add a view-level filter with the formula "sales_case_table_customer_experience_v3"."country" = ${Country}. This filter applies to all widgets in the view upon opening. Existing example screenshot 6
  5. The Overview view (set as home) contains a Bar Chart showing median duration by country. The Country dimension (formula "sales_case_table_customer_experience_v3"."country") is used, with the Open view click action configured for this dimension. Existing example screenshot 7
  6. The Order Status Distribution view is selected to open in a side window. Existing example screenshot 1
  7. The Column input method is selected for the input value, specifying the country name column to filter data in the opened view. Existing example screenshot 5
  8. To trigger the click action immediately upon clicking the dimension in Browse mode, filtering is disabled for the Bar Chart. Existing example screenshot 9
  9. Publish the dashboard and click on a country bar. Existing example screenshot 3
  10. The filtered Order Status Distribution view opens, displaying data for the selected country. Existing example screenshot 4

Example of Opening a Script-Generated View

Using a script-generated view, you can display components from another view, even if it is located in a different dashboard.

  1. Open the dashboard containing the view to use as script-generated. Generated example screenshot 1
  2. Switch to the YAML editor and copy the view code. Generated example screenshot 2
  3. Open the target dashboard and add a new script named YAML-Generated View.
  4. Add a Manual Start block to the script and test it. Generated example screenshot 3
  5. Add a Return Data block. Select Text as the request format and paste the copied YAML view code as the returned data. Test the block. Generated example screenshot 4
  6. The block returns the YAML view code. Publish the script and open the dashboard where you will use the generated view.
  7. Add a Placeholder to the view and select YAML-Generated View for display. Generated example screenshot 5
  8. The placeholder displays the previously copied view. Publish the dashboard. Generated example screenshot 6
  9. In Browse mode, interact with the generated view components as usual—for example, apply filters. Generated example screenshot 7

Click Action in YAML

To add a click action (OPEN_VIEW), use the keys listed in the tables below. Specify these keys within the onClick block. Keys for the onClick block are described on the page Click Actions.

KeyTypeDefinition
modeenumView opening mode:
EMPTY — none
EXISTED_VIEW — existing view
GENERATED_BY_SCRIPT — script-generated
viewKeystringView key
Only for EXISTED_VIEW mode
scriptKeystringScript key
Only for GENERATED_BY_SCRIPT mode
displayNamestringView name or display name for generated view
Only for GENERATED_BY_SCRIPT mode

To specify view or script parameters, include a parameters block. Inside this block, use the name and inputMethod keys.

KeyTypeDefinition
parametersScript parameters
namestringParameter name
inputMethodenumInput Method value

The openIn key controls, how the view opens during the click action. Use the keys listed below within this block.

KeyTypeDefinition
openInenumOpen in parameter
modeenumView display mode:
- WINDOW — in window
- DRAWER_WINDOW — in side panel
- MODAL_WINDOW — in modal window
- PLACEHOLDER — in placeholder
newWindowbooleanOpen in new window. Only for WINDOW mode
actionButtonsbooleanShow action buttons switch. Only for DRAWER_WINDOW and MODAL_WINDOW modes
positionByClickbooleanAt click location switch. Only for MODAL_WINDOW mode
alignmentenumAlignment:
LEFT — left
RIGHT — right
Only for DRAWER_WINDOW mode
placeholderNamestringPlaceholder name. Only for PLACEHOLDER mode

Example:

onClick:
  - mode: EXISTED_VIEW
    name: Open view
    viewKey: 488d8c5d-d61b-334e-befd-872892671b31
    type: OPEN_VIEW
    openIn: CURRENT_WINDOW
    parameters:
      - inputMethod: COLUMN
        name: Country
        columnName: en_name
        tableName: sales_case_table_customer_experience_v3

Was the article helpful?

Yes
No
Previous
Run Script
We use cookies to improve our website for you.