Custom Action

Custom action widgets allow you to code an action to be performed, which will be triggered by a button or a form.

How it Works

Custom action widget

This widget will display a form or button that will execute the user-coded action.

In the case of using a form, the action will receive the form values and any desired logic can be applied to them.

Additionally, this widget can be configured so that the action executes within a dialog box as an independent form.

Custom action execution result

Once the execution is initiated, a progress box will appear displaying the result of the action.

The execution will be successful as long as no exception is thrown in the source code.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code Extra action code

You can find all available functions and methods in Extra parameters

  • Description here you will write what action will be executed when the corresponding button is pressed
  • Icon determines the type of desired visualization: a button with an icon, an image, or a custom form. In the case of a form, it can also be specified if you want to display it as a dialog box.
Custom action general configuration

If it’s a form, you must enter a JSON schema that determines what will be drawn.

Custom action schema configuration

Expert

Custom action expert configuration

Here you can configure source code that will run before the widget is loaded, allowing for the dynamic construction of the JSON schema of the form to be displayed, thereby facilitating the construction of dynamic forms based on platform data.