Configure global variables

更新时间:
复制 MD 格式

In the blueprint editor, a global variable is shared across the entire blueprint and passes parameters between widgets. Its value can be updated dynamically at runtime, allowing for dynamic responses in your interaction logic. This topic describes the concept of global variables and how to use them in the blueprint editor.

Preparations

Prerequisites

You have created a PC data dashboard project.

Go to the global variables page

  1. Access the DataV console.

  2. On the All Applications page, hover over the target dashboard and click Edit.

  3. On the dashboard editor page, click the image icon in the top menu bar to open the blueprint editor. On the left of the main canvas, click Global Variables to open the Global Variables configuration pane.

Before you configure global variables, familiarize yourself with the interface layout and operations of the blueprint editor.

Configure global variables

Create a global variable

Click New Variable and configure the parameters for the variable.

Parameter

Description

Variable Name

The name of the global variable.

Description

The description of the global variable.

Source

The source of the global variable. Options include Static Value, Data Source Request, and Get from URL Query.

Note

For more information about how to use different source types, see Global variables.

Initial Value

The initial default value of the global variable.

Filter

Optional. Add a data filter to further screen the required data. For more information, see Configure and use filters.

Data Response

The system response after the global variable parameters are set. The response varies based on the variable type.

Controlled Mode

If you enable this mode, the initial value of the variable is invalid.

Auto Update

If you enable this option, you can configure dynamic polling and manually enter the polling frequency.

Manage global variables

Note

Click the name of an existing global variable to expand or collapse its details.

  • Hover over a variable and click the image icon on the right to rename the variable.

  • Hover over a variable and click the image icon on the right to copy the variable.

  • Hover over a variable and click the image icon on the right to delete the variable.

  • Hover over a variable and click the image icon on the right to add the variable to the main blueprint canvas.

    Important
    • Deleted variables cannot be recovered. Proceed with caution.

    • Before you delete a variable, you must remove all references to it. For more information, see Configure widget interactions.

Use a global variable

  1. Add the required layers, such as the Tab List and Common Title widgets, to the main canvas. Then, click the {CF99DEA7-1F70-499C-B305-121973EF06EB} icon in the top menu bar to open the blueprint editor.{E6BB06E3-2100-4175-96A9-3AAB8454A61E}

  2. In the navigation pane on the left, click Global Variables to open the global variables page.

  3. In the global variable list, create a global variable.

  4. Click the image icon to add the global variable to the main blueprint canvas and connect it to other nodes. For example, you can connect the Tab List widget to the global variable to pass an event. After the global variable processes the event, the resulting data is imported into the Common Title widget through a data API.image

  5. Preview or publish your dashboard to view the interaction.2025-02-14_10-29-49

Examples

For more information about the capabilities of global variables, see the following examples: