Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Actions

Widget actions run predefined operations when a user interacts with a widget — for example, clicks a header button or a table row. Use them to navigate between dashboards, interact with devices, update entity data, or run custom logic.

Actions are configured per widget. The interaction that triggers an action is its action source. Available sources depend on the widget type; action types are the same for all widgets.


Widgets have two edit modes, and the steps differ slightly:

  • Basic — a settings panel that opens when you click the pencil icon on the widget. Actions are managed in a modal list opened from the Actions section.
  • Advanced — a full-screen tabbed editor opened from the basic panel. Actions are listed directly on the Actions tab.

Both modes use the same Add action dialog to set the source, name, icon, and type.

Basic Widget Configuration

  1. Click the pencil icon on the widget to open its settings panel.
  2. Scroll to the Actions section and click Add action to open the Actions list. After the first action is saved, the button is replaced by a + icon.
  3. Click + in the top-right corner of the Actions list to open the Add action dialog. Set the action source, name, icon, and type, then click Add.
  4. Click Save to close the list.
  5. Click Apply to save the widget settings, then click Save in the dashboard toolbar.

Advanced Widget Configuration

  1. Click the pencil icon on the widget to open its settings panel, then switch to advanced mode to open the full widget editor.
  2. Navigate to the Actions tab and click + to open the Add action dialog.
  3. Set the action source, name, icon, and type, then click Add.
  4. Click Apply to save the widget settings, then click Save in the dashboard toolbar.

Copy actions to paste them into another widget without exporting a file, or duplicate an action within the same widget. The controls are available in the Actions list (basic mode) and on the Actions tab (advanced mode):

  • Copy a single action — click the More (⋮) icon in the action row and select Copy action.
  • Copy all actions — click the More (⋮) icon in the list header and select Copy all actions.
  • Paste actions — open the target widget’s actions, click the More (⋮) icon in the list header, and select Paste actions. The option is available after you copy at least one action.
  • Duplicate an action — click the More (⋮) icon in the action row and select Duplicate action. The option is available only for action sources that support multiple actions.

Copied actions are stored in your browser, so you can paste them into a widget on any dashboard opened in the same browser.

Pasted and duplicated actions are added to the widget’s existing actions; existing actions are not replaced. ThingsBoard:

  • skips actions whose source or type the widget does not support, and actions for a source that allows only one action and already has one;
  • appends a number to the name of an action that duplicates an existing name for the same source, for example Edit machine (2);
  • clears the column of an On cell click action if that column does not exist in the widget or already has an action. Edit the action to assign a column.

Click Apply to save the widget settings, then Save in the dashboard toolbar.


Export widget actions to a JSON file to reuse them in another widget or dashboard. The controls are in the same More (⋮) menus:

  • Export all actions — click the More (⋮) icon in the list header and select Export actions.
  • Export a single action — click the More (⋮) icon in the action row and select Export action.
  • Import actions — click the More (⋮) icon in the list header, select Import actions, and upload the exported JSON file.

Imported actions are added to the existing actions according to the same rules as pasted actions.

Click Apply to save the widget settings, then Save in the dashboard toolbar.


Action type Description
Navigate to new dashboard state Navigates to a specified state within the current dashboard, adding a breadcrumb step.
Update current dashboard state Updates the entity context of the current state, or switches to another state, without adding a breadcrumb step.
Navigate to other dashboard Navigates to a different dashboard, optionally to a specific state within it.
Custom action Executes a custom JavaScript function, for example, to delete a device or asset.
Custom action (with HTML template) Executes a custom JavaScript function with an HTML template, for example, a create or edit dialog.
Mobile action Uses phone features in the ThingsBoard mobile app: camera, QR code scanning, location, phone calls.
Open URL Opens any URL, optionally in a new browser tab.
Place map item Creates an entity and places it on the map. Available for map widgets only.

Save browser location is also available. It reads the browser’s geolocation once and saves it to an entity without custom JavaScript. Its target-entity and data-key settings match the location mobile actions — see Location tracking.

Opens the selected dashboard state in place of the current view, in a dialog, or in a popover.

Unless the state opens in a dialog or popover, each navigation adds a step to the breadcrumb in the dashboard toolbar, and the breadcrumb is stored in the page URL.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select an action source (for example, Action cell button).
  3. Enter an action name and choose an icon.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Save and Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Open in a Separate Dialog or Popover

Use the Dashboard state display option field in the action settings to choose how the target state opens:

  • Normal — navigates to the state, replacing the current view (default).
  • Open in separate dialog — opens the state in a modal dialog with a configurable title, toolbar visibility, and size.
  • Open in popover — opens the state in a popover next to the trigger element, with configurable placement, width, and height.
  1. In the action settings, open the Dashboard state display option dropdown and select Open in separate dialog.
  2. Optionally, clear Hide dashboard toolbar in dialog to show the time window, export, and fullscreen controls in the dialog.
  3. Optionally, set the dialog width and height as a percentage of the viewport.
  4. Save all changes.

Updates the entity context of the current dashboard state without navigating away — for example, to show the selected entity’s data in a chart or map on the same dashboard.

With a Target dashboard state selected, it switches to that state instead. Either way it adds no breadcrumb step, so the page URL does not grow — use it for tab bars and navigation menus.

For this example, add a Time series chart widget whose datasource uses the “Entity from dashboard state” alias, so the chart shows the currently selected entity:

Now add an Update current dashboard state action to the Entities table widget:

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select Action cell button as the action source, enter a name (for example, Chart temperature), and choose an icon.
  3. Select Update current dashboard state as the action type.
  4. Click Add, then Save and Apply to save the widget settings.
  5. Click Save in the dashboard toolbar.

Click the action icon next to an entity to show its data in the chart.

Opens another dashboard, optionally at a specific state.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select the action source (for example, Widget header button), enter a name, and choose an icon.
  3. Select Navigate to other dashboard as the action type, then choose the target dashboard and, optionally, its state.
  4. Click Add, then Save and Apply to save the widget settings.
  5. Click Save in the dashboard toolbar.

Runs a custom JavaScript function — for example, to delete a device or asset from a table widget. Example — delete a device:

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select Action cell button as the action source, enter a name (for example, Delete device), and choose an icon.
  3. Select Custom action as the action type. A JavaScript function editor appears.
  4. Paste the function below, click Add, Save, and Apply, then save the dashboard.

Function for deleting a device:

let $injector = widgetContext.$scope.$injector;
let dialogs = $injector.get(widgetContext.servicesMap.get('dialogs'));
let deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));
openDeleteDeviceDialog();
function openDeleteDeviceDialog() {
let title = "Are you sure you want to delete the device " + entityName + "?";
let content = "Be careful, after the confirmation, the device and all related data will become unrecoverable!";
dialogs.confirm(title, content, 'Cancel', 'Delete').subscribe(
function(result) {
if (result) {
deleteDevice();
}
}
);
}
function deleteDevice() {
deviceService.deleteDevice(entityId.id).subscribe(

Clicking the trash icon next to an entity opens a confirmation dialog.

Like Custom action, but adds an HTML template for a dialog — useful for entity create and edit forms. The editor has four tabs:

  • Resources — external JavaScript and CSS resources
  • CSS — custom styles
  • HTML — dialog markup
  • JavaScript — action logic

This example adds two buttons: one in the widget header to create entities and one per row to edit them. Start with the Add action:

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select Widget header button as the action source, enter a name (for example, Add device), and choose an icon.
  3. Select Custom action (with HTML template) as the action type.
  4. In the JavaScript tab, paste the function for adding a new entity (example below).
  5. In the HTML tab, paste the dialog markup (example below).
  6. Click Add, then Save and Apply to save the widget settings.

JavaScript function for adding a device or asset:

let $injector = widgetContext.$scope.$injector;
let customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));
let assetService = $injector.get(widgetContext.servicesMap.get('assetService'));
let deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));
let attributeService = $injector.get(widgetContext.servicesMap.get('attributeService'));
let entityRelationService = $injector.get(widgetContext.servicesMap.get('entityRelationService'));
openAddEntityDialog();
function openAddEntityDialog() {
customDialog.customDialog(htmlTemplate, AddEntityDialogController).subscribe();
}
function AddEntityDialogController(instance) {
let vm = instance;
vm.allowedEntityTypes = ['ASSET', 'DEVICE'];
vm.entitySearchDirection = {
from: "FROM",
to: "TO"

HTML template for the add-entity dialog (HTML tab):

<form #addEntityForm="ngForm" [formGroup]="addEntityFormGroup"
(ngSubmit)="save()" class="add-entity-form">
<mat-toolbar fxLayout="row" color="primary">
<h2>Add entity</h2>
<span fxFlex></span>
<button mat-icon-button (click)="cancel()" type="button">
<mat-icon class="material-icons">close</mat-icon>
</button>
</mat-toolbar>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<div mat-dialog-content fxLayout="column">
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column" fxLayoutGap.xs="0">
<mat-form-field fxFlex class="mat-block">
<mat-label>Entity Name</mat-label>
<input matInput formControlName="entityName" required>
<mat-error *ngIf="addEntityFormGroup.get('entityName').hasError('required')">
Entity name is required.
</mat-error>

Next, add the per-row Edit action: click + in the Actions list, select Action cell button as the source, enter a name (for example, Edit device), select Custom action (with HTML template), and paste the JavaScript function and HTML template below.

JavaScript function for editing a device or asset:

let $injector = widgetContext.$scope.$injector;
let customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));
let entityService = $injector.get(widgetContext.servicesMap.get('entityService'));
let assetService = $injector.get(widgetContext.servicesMap.get('assetService'));
let deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));
let attributeService = $injector.get(widgetContext.servicesMap.get('attributeService'));
let entityRelationService = $injector.get(widgetContext.servicesMap.get('entityRelationService'));
openEditEntityDialog();
function openEditEntityDialog() {
customDialog.customDialog(htmlTemplate, EditEntityDialogController).subscribe();
}
function EditEntityDialogController(instance) {
let vm = instance;
vm.entityName = entityName;
vm.entityType = entityId.entityType;
vm.entitySearchDirection = {

HTML template for the edit-entity dialog (HTML tab):

<form #editEntityForm="ngForm" [formGroup]="editEntityFormGroup"
(ngSubmit)="save()" class="edit-entity-form">
<mat-toolbar fxLayout="row" color="primary">
<h2>Edit {{entityType.toLowerCase()}} {{entityName}}</h2>
<span fxFlex></span>
<button mat-icon-button (click)="cancel()" type="button">
<mat-icon class="material-icons">close</mat-icon>
</button>
</mat-toolbar>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<div mat-dialog-content fxLayout="column">
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column" fxLayoutGap.xs="0">
<mat-form-field fxFlex class="mat-block">
<mat-label>Entity Name</mat-label>
<input matInput formControlName="entityName" required readonly="">
</mat-form-field>
<mat-form-field fxFlex class="mat-block">
<mat-label>Entity Label</mat-label>

Click Add, Save, and Apply, then click Save in the dashboard toolbar.

Click the Add device button in the widget header to open the create dialog. Select entity type “Device”, fill in the required fields, and click Create.

Click the pencil icon next to an entity to open the edit dialog. Edit the fields and click Save.

Uses a native phone feature when the user taps the action in the ThingsBoard mobile app. Mobile action types:

  • Scan QR code — opens the camera to scan a QR code and processes the result in a custom JavaScript function.
  • Take photo — opens the camera to capture a photo, which is then handled by a custom function (for example, uploaded as an attribute).
  • Get phone location — gets the phone’s current GPS coordinates and passes them to a custom function.
  • Make phone call — dials a phone number provided by a custom function or taken from an entity attribute.
  • Open URL — opens a URL in the mobile app’s in-app browser.
  • Start live location tracking — starts a background GPS session that streams the phone’s position to an entity until the session ends.
  • Stop live location tracking — ends the session that is currently running. It never starts one.

Get phone location can also save its result to an entity directly, without a custom function. See Location tracking for the target-entity and data-key configuration shared by all of these.

Mobile actions work only in the ThingsBoard mobile app, not on the web dashboard. See mobile actions for the full configuration guide.

Opens a URL — a web page, document, image, or internal ThingsBoard page — optionally in a new browser tab. Use template variables such as ${entityName} and ${entityId} to build links from the entity context.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select the action source (for example, Widget header button), enter a name, and choose an icon.
  3. Select Open URL as the action type, enter the target URL, and optionally enable Open in a new browser tab.
  4. Click Add, then Save and Apply to save the widget settings.
  5. Click Save in the dashboard toolbar.
Only for Map widgets

Place map item adds a button to the map widget for creating an entity and placing it on the map. The user clicks the button, then the map; after the user confirms the create dialog, ThingsBoard saves the entity and shows the new item at the chosen location.

Four item types are supported:

Item type Description
Marker A point marker placed at the clicked location.
Circle A circle centered on the clicked point, with a configurable radius.
Polygon A polygon drawn by clicking multiple vertices, closed on the final click.
Polyline A line path drawn by clicking multiple points.

The action includes a default JavaScript function that opens a standard create dialog. To control the dialog fields, replace it with a custom function and HTML template, as in Custom action (with HTML template).

Example: add an “Add EV station” button that places new charging station assets on the map.

Configure the Datasource

For new entities to appear on the map immediately, the widget’s datasource alias must resolve to the entity type you create. Configure it before adding the action:

  1. In the widget settings, open the Overlays section and select the Marker tab.
  2. Create a new entity alias — name it “EV stations”, set the filter type to Asset type, and specify the type as “EV station”.
  3. Click Apply.

Configure the Action

  1. Open the widget in edit mode, scroll to the Actions section, and click Add action, then click +.
  2. Select Widget header button as the action source. Enter a name (for example, Add EV station), then configure the button appearance — type, icon, and optional background color.
  3. From the Action dropdown, select Place map item and choose the item type — in this example, Marker.
  4. Keep the default JavaScript function or replace it with a custom one.
  5. Click Add, then Save, Apply, and Save the dashboard.

Place an Item

Click Add EV station in the widget header, then click a location on the map. In the Add entity dialog, enter a name, select the entity and asset type, and click Create. The marker appears on the map.

Navigate to Devices & assets ⇾ Assets to verify that the asset was created.

An action source is the user interaction that triggers an action: clicking a button, a row, or a map marker, double-clicking a row, and so on. The examples below use the Entities table widget with the Navigate to new dashboard state action type.

Adds a button to the widget header. The action applies to the widget as a whole, not to an individual entity. Available in all widget types.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select Widget header button as the action source.
  3. Enter an action name and choose an icon for the button.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Save and Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Result

Adds an icon button to each entity row. The action runs for that row’s entity — for example, to open its details, edit it, or delete it.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select Action cell button as the action source.
  3. Enter an action name and choose an icon for the button.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Save and Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Result

Triggers when the user clicks anywhere on an entity row; no button is shown. Combine it with On row double click to assign different actions to single and double clicks.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On row click as the action source.
  3. Enter an action name. Optionally, choose an icon.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Save and Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Result

Triggers when the user double-clicks an entity row. You can combine it with On row click.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On row double click as the action source.
  3. Enter an action name. Optionally, choose an icon.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Save and Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Result

Only for Entities table, Alarms table, Device admin table, and Asset admin table widgets

Triggers when the user clicks a cell in a specific column, selected by column index. Unlike On row click, each column can have its own action — for example, a temperature cell opens a temperature popover and a humidity cell opens a humidity popover.

Configure the temperature column action:

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On cell click as the action source.
  3. From the Column index dropdown, select the temperature column.
  4. Enter an action name, select Navigate to new dashboard state, and choose the target state.
  5. In Dashboard state display option, select Open in popover, set placement to Right, and specify width/height.
  6. Click Add.

Configure the humidity column action:

  1. Click + to add another action.
  2. Select On cell click as the action source.
  3. From the Column index dropdown, select the humidity column.
  4. Enter an action name, select Navigate to new dashboard state, and choose the target state.
  5. In Dashboard state display option, select Open in popover, set placement to Bottom, and specify width/height.
  6. Click Add, then Save and Apply to save the widget settings.
  7. Click Save in the dashboard toolbar to save the dashboard.

Clicking a temperature or humidity cell now opens the matching popover for that device.

Only for Entities hierarchy widget

Triggers when the user selects a node in the Entities hierarchy widget, which shows entities and their relations as a tree. The action runs for the selected node’s entity.

In this example, selecting a node opens a state with that node’s details.

Only for HTML widgets

On HTML element click triggers an action when the user clicks a marked element in the widget’s HTML template.

How it works

The id attribute links an element in the widget’s HTML to an action on the Actions tab.

Assign the id to any element, such as <div>, <span>, <p>, <h1>, or <button>. Apply it to a container such as <p> or <div> to make the entire block clickable.

<p id="details" class="blue-box">
Current temperature: <span>22.5 °C</span>
</p>

Tips

Configuration

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On HTML element click as the action source.
  3. Enter a Name — it also serves as the id of the target HTML element.
  4. Choose the action type (for example, Navigate to new dashboard state) and specify the target state.
  5. Click Add.
  6. Go to the Appearance tab, open the HTML section, and add an id attribute to the target element that exactly matches the action name.
  7. Click Apply to save the widget settings, then Save in the dashboard toolbar.

ThingsBoard then runs the action when the user clicks an element whose id matches the action name.

Example: Markdown/HTML Card widget — click the blue area

Preparation:

  1. Add a Markdown/HTML Card widget to your dashboard using the HTML and CSS provided below.
  2. Create a dashboard state that shows the device’s temperature details.

Alternative: You can download a pre-configured dashboard with the Markdown/HTML Card widget and the details state already set up, then import it.

Add the Markdown/HTML Card

Markdown/HTML pattern:

const entity = data[0];
const color = entity.temperature > 25 ? "red" : entity.temperature > 20 ? 'green' : 'blue'
const entityName = `### Temperature value card\n - Current entity: <span >${entity.entityName}</span>\n `
const temp = `- Current temperature: <span style="color:${color};">${entity.temperature.toFixed(1)} °C</span>\n `
return entityName + temp;

Markdown/HTML CSS:

.office-card {
box-sizing: border-box;
padding: 16px;
margin: 6px 0;
text-align: center;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
}
.office-card h3 {
margin: 0 0 12px;
font-size: 24px;
}
.blue-box {
background: #2196F31A;
border: 2px solid #2196F3;
border-radius: 10px;
padding: 10px;
margin: 8px 0;
font-weight: 700;

Add the action

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On HTML element click as the action source.
  3. Enter details as the action name.
  4. Select Navigate to new dashboard state as the action type.
  5. In Target dashboard state, select the state you created earlier.
  6. Click Add.

Add id to the HTML

  1. Go to the Appearance tab and open the HTML section.

  2. Add id="details" to the <p class="blue-box"> element. Replace it with:

    <p id="details" class="blue-box">

    The entire blue box is now clickable and linked to the details action.

  3. Click Apply, then Save in the dashboard toolbar.

Result

Clicking the blue block with the current temperature opens the target state.

Map widgets provide action sources for their interactive elements: markers, circles, polygons, polylines, and tooltip links. The examples below assume you already have a Map widget and a target dashboard state set up.

Triggers when the user clicks a circle on the map. A circle is defined by a JSON entity attribute: {"latitude": ..., "longitude": ..., "radius": ...} (radius in meters). The circle’s entity is passed to the target state. See Map widget configuration for setup details.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On circle click as the action source.
  3. Enter an action name. Optionally, choose an icon.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Triggers when the user clicks an entity marker on the map. Markers appear for every entity with latitude and longitude coordinates. The marker’s entity is passed to the target state.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On marker click as the action source.
  3. Enter an action name. Optionally, choose an icon.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Triggers when the user clicks inside a polygon on the map. A polygon is defined by a JSON array of coordinate pairs [[lat, lng], [lat, lng], ...] in an entity attribute and can represent a building, district, or any bounded area. The polygon’s entity is passed to the target state. See Map widget configuration for setup details.

  1. Open the widget in edit mode, go to the Actions tab, and click +.
  2. Select On polygon click as the action source.
  3. Enter an action name. Optionally, choose an icon.
  4. Select Navigate to new dashboard state as the action type, then choose the target state.
  5. Click Add, then Apply to save the widget settings.
  6. Click Save in the dashboard toolbar to save the dashboard.

Adds clickable links to the tooltip shown when a marker is clicked. Each <link-act> tag calls an action by name, so one marker can offer several actions. The tag’s name attribute must match the action name exactly (case-sensitive). For per-entity tooltip content, use tooltip function mode in the map widget’s advanced settings.

  1. Open the widget in edit mode, go to the Actions tab, and click +.

  2. Select Tooltip tag action as the action source.

  3. Enter the action name to use in the <link-act> tag. Optionally, choose an icon.

  4. Select Navigate to new dashboard state as the action type, then choose the target state.

  5. Click Add.

  6. Go to the Appearance tab, enable Show tooltip, and add a <link-act> tag referencing the action name:

    <link-act name='TooltipTag'>Navigate to the ${entityName}</link-act>

    where TooltipTag is the action name and the element text is the link label shown in the tooltip.

  7. Click Apply to save the widget settings.

  8. Click Save in the dashboard toolbar to save the dashboard.

A common pattern is an Entities table with a Time series chart that shows the selected row’s data. On desktop, place the widgets side by side and use the Update current dashboard state action. On mobile, the ThingsBoard PE Mobile Application stacks widgets vertically, so users must scroll down to the chart.

The Layouts feature solves this with a Divider layout:

Add the Time series chart widget to the right layout:

Configure the Time series chart widget to show data for the entity selected in the Entities table:

Now add an Update current dashboard state action to the Entities table widget:

  1. Open the Entities table widget in edit mode and go to the Actions tab.
  2. Select On row click as the action source and enter an action name.
  3. Select Update current dashboard state as the action type.
  4. Enable Open right dashboard layout (mobile view).
  5. Click Add, then Save.

Click Apply, save the dashboard, and test the action. On mobile, tapping an entity row opens the Time series chart in the right layout:

The Set entity from widget checkbox passes the selected entity to the target dashboard state, where widgets can use it through the Entity from dashboard state alias. For example, clicking a device row in an Entities table makes the detail widgets in the next state show that device’s data.

To keep several entities in the state, use separate state entity parameters. For example, to go from a customer list to the customer’s devices and then to a single device, use three states — “Main”, “Customer Devices”, and “Device Details” — with parameters such as currentCustomer and currentDevice on the “Device Details” state.