Skip to main content
How to Create a Global Variable

Build widgets with a constant variable

Barry Thomson avatar
Written by Barry Thomson
Updated over a week ago

When creating a widget, the workflow often prompts you to select an asset or task element. If you're using the same variable again and again, you could save a bit of time by inserting a global variable. Global variables are saved on the dashboard and can be imported into a filter by selecting the relevant widget field.

Opening the variable window

To create a global variable:

  1. Click Dashboard on the side menu.

  2. Go to the top right corner and click Edit Layout> Add Variable.

  3. Fill in the fields (see below).

  4. Click Save.

Filling in the fields

Enter a name and then select a Type.

  • If you select Text or Date, default values are optional.

  • If you select Numeric, a default value is required.

  • If you select List, you must select (or create) a List name and enter a default value.

Importing a global variable

Here's an example of how to import a global variable into a widget filter. In the input field after Equals, you could hard input a value (e.g. a name or number). Or, click the three-dot icon and select Use Global Variable. Then click the field and select a global variable on the drop-down.

If you select Add Global Variable, you can create a new variable without closing the widget window.

Changing the default value

You can update the global variable value. Go to the dashboard and click the variable. In the popup, change the value in the Current Value field. Optionally, click the edit icon to update form fields (i.e. title, type, description).

If you change the current value, Nektar auto-updates all the widgets using that global variable.


Related articles

Did this answer your question?