MSPBots WIKI : Adding a Calculate Layer to a Widget
This article shows how to add a calculate layer to a widget. The calculate layer is used in grid-type widgets when users want to display a column that computes a value using the other columns in the widget.
To add a calculate layer in a widget:
- Go to Widgets on the MSPbots menu.
- Click on the New Widget button.
- Click Grid on the New Widget window. You will be redirected to the Widget Builder.
- Provide the necessary info for this widget like the Name, Description, and Role, then click Apply.
- Click the Dataset icon then click the + button for Data Source.
- Select New Layer on the Add New Layer popup. Note that you need to create the columns before you can compute for the calculate layer.
- On the Dataset window that appears, create the data source by adding the datasets, including the filters needed for your widget.
- Repeat steps 6 and 7 until you have all the columns needed to compute the calculate layer.
- Click on the + button and select Calculate Layer.
- On the Calculate Layer window, fill in the Name, then the Formula to compute the calculate layer. Simply select the data sources to be used for the formula.
- You may choose a format for the Number Format Type by clicking the paintbrush icon and selecting a format.
- Once done, click Save then Apply. The calculate layer will now appear.