You can use custom script based widgets with an automation script to create dynamic widgets for more complex calculations. For examples of creating widgets using scripts, see Script Based Widgets Using Automation Scripts Examples.
You need to create or upload the script to the Automation page and then you can create a widget in Widgets Library. In the Widgets Library, you can define the arguments and change the visuals.
If you upload a script to the Automation page, the Arguments field is automatically updated. You can then define the arguments in the Widget Builder. If you create a new automation (without uploading) in the Automation page, you need to add the arguments manually for them to appear in the Widgets Library when creating or editing a widget.
In the Automation page, upload or create a new automation.
Create the following widgets using automations:
Table or List
Filter Data for all Widgets (Pivoting)
For examples, see Script Based Widgets Using Automation Scripts Examples.
For dashboards and reports, create a widget in the Widgets Library, as described in Create a Widget using the Widget Builder.
Select the Script based data type and then add the script.
(Upload automation only) If you have added arguments, these appear when creating a widget. If you have not uploaded the automation, you need to add the arguments manually in the Automation page.
Add the script based widget to one of the following: