Saving a Widget as a Template
Last updated
Last updated
You can save an existing user-created widget as a Widget Template and reuse it to create new widgets.
It is assumed that you have the basic knowledge on creating Folders and Widgets in Lucy.
Find the article here to create a new folder.
For an example, if you want to create a widget similar to an existing one but with a different data source, save the current widget as a template, then use it to build the new widget.
e.g., Consider a bar chart widget that displays the count of IT assets categorised by asset category. You can save this widget as a template. Then, create a new bar chart widget based on the template and link it to a different data source.
In this article, we'll use an existing bar chart widget and save it as a template. Then use that template to create another bar chart by selecting a different data source.
Find the article on how you can create a bar chart widget to visualise information.
Visualising Data by Selecting a Data source
For more insights on designing a user interface, find the article here.
Below are the steps to save an existing widget as a template.
On the app homepage, go to the My Work tab.
Search and click on the desired folder to open it.
Go to the User Interfaces tab.
Search and select the required user interface. Then mouse hover over it and click the Edit icon that displays.
Click the Save widget as a template button.
Template Name: Enter a unique template name.
Template Description: Enter a short detail related to the template.
Click Save.
Now, the widget will be listed under the "My Templates" tab in the "Select a Template" window.
Now, whenever you need to create a new widget similar to one you've already designed, you can easily use a saved widget template. Any type of widget you've created, such as a Form, Simple Card, Radial Gauge, can be saved as a template for future use.
All your saved templates can be accessed from the "My Templates" tab in the "Select a Template" window.
To create a new widget, we can leverage a saved template, customise it to suit our needs, and connect it to a different data source. You can create unlimited number of customised widgets using a saved template.
On the app homepage, go to the My Work tab.
Search and click on the folder you wish to open.
Go to the User Interfaces tab.
Click the Plus icon.
Click Start from Scratch option.
Go to the My Templates tab in the Select a Template window.
Saved templates will be listed.
Find the template and click on it.
Click Edit this Template.
The selected widget template will open on the widget designer page.
Customise the widget as necessary.
Click on the bar chart to launch its properties panel.
Under Source section, click on the linked database.
Bind a different data source.
After selecting and preparing the data source, click Looks Good.
Customise the widget as necessary.
Under General tab, provide a name for the widget.
Click Save Widget to save the customisations.
Click the Share button. Then click Open Page to open your widget in a new window.
Click the three dots on the top right.
Click the icon to select a different data source. You can select a lucy action or a database.