Open View
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)
For the Open view click action, configure parameters for all input values, if they are defined in the settings of the view being opened.
When opening a script-generated view, you may need to configure parameters. Use the following input methods: Column, Variable, Formula, or Set by aggregation.
- 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
- The workspace Data Model includes the
sales_case_table_customer_experience_v3table containing information about sales in various countries. Thecountrycolumn specifies the countries in which the sales took place. - A dashboard exists with two views: Overview and Order Status Distribution.
- The Order Status Distribution view contains a Donut Chart showing various order statuses and an input value named Country.
The default value uses the formula:
any("sales_case_table_customer_experience_v3"."country"). - 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. - 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. - The Order Status Distribution view is selected to open in a side window.
- The Column input method is selected for the input value, specifying the country name column to filter data in the opened view.
- To trigger the click action immediately upon clicking the dimension in Browse mode, filtering is disabled for the Bar Chart.
- Publish the dashboard and click on a country bar.
- The filtered Order Status Distribution view opens, displaying data for the selected country.
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.
- Open the dashboard containing the view to use as script-generated.
- Switch to the YAML editor and copy the view code.
- Open the target dashboard and add a new script named YAML-Generated View.
- Add a Manual Start block to the script and test it.
- 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.
- The block returns the YAML view code. Publish the script and open the dashboard where you will use the generated view.
- Add a Placeholder to the view and select YAML-Generated View for display.
- The placeholder displays the previously copied view. Publish the dashboard.
- In Browse mode, interact with the generated view components as usual—for example, apply filters.
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.
| Key | Type | Definition |
|---|---|---|
| mode | enum | View opening mode:EMPTY — noneEXISTED_VIEW — existing viewGENERATED_BY_SCRIPT — script-generated |
| viewKey | string | View key Only for EXISTED_VIEW mode |
| scriptKey | string | Script key Only for GENERATED_BY_SCRIPT mode |
| displayName | string | View 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.
| Key | Type | Definition |
|---|---|---|
| parameters | — | Script parameters |
| name | string | Parameter name |
| inputMethod | enum | Input Method value |
The openIn key controls, how the view opens during the click action. Use the keys listed below within this block.
| Key | Type | Definition |
|---|---|---|
| openIn | enum | Open in parameter |
| mode | enum | View display mode: - WINDOW — in window- DRAWER_WINDOW — in side panel- MODAL_WINDOW — in modal window- PLACEHOLDER — in placeholder |
| newWindow | boolean | Open in new window. Only for WINDOW mode |
| actionButtons | boolean | Show action buttons switch. Only for DRAWER_WINDOW and MODAL_WINDOW modes |
| positionByClick | boolean | At click location switch. Only for MODAL_WINDOW mode |
| alignment | enum | Alignment:LEFT — leftRIGHT — rightOnly for DRAWER_WINDOW mode |
| placeholderName | string | Placeholder 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?