Sometimes you'll want to measure the performance of a particular activity. For example, monitoring the number of submissions in your dashboard. To reveal this information, you'll add a KPI widget to view this metric.
Preconfiguration
In this how-to guide, you’ll learn how to add a KPI widget to your dashboard that displays the number of accounts (submissions). This example also includes steps for building a dashboard with an action button, and retrieves submissions from the following source module: https://training.unqork.io/#/form/5eb482f3c8368d0210c74cbf/edit.
These instructions assume you have a new Front-End module open, saved, and with a title.
Configure the Panel Component
This Panel component acts as a container for the components that follow.
In the Module Builder, drag and drop a Panel component onto your canvas.
In the Property ID field, enter
panelDashboard.Click Save Component.
Configure the Initializer Component
This Initializer component triggers the Plug-In components that you'll set up later.
Drag and drop an Initializer component inside your Panel component.
In the Property ID and Canvas Label Text fields, enter
initStart.From the Trigger Type drop-down, select New Submission.
In the Outputs table, enter the following:
Source
Type
Value
pluginGetSubmissions
trigger
GO

Click Save Component.
Configure the Hidden Component
This is the first of two Hidden components in this configuration. It stores the module ID of your source or submission module. You can retrieve the module ID from the source module’s URL as follows: https://training.unqork.io/#/form/5eb482f3c8368d0210c74cbf/edit.
Drag and drop a Hidden component inside your
panelDashboardPanel component, below the Initializer component.In the Property ID and Label Text fields, enter
moduleId.In the Default Value field, enter
5eb482f3c8368d0210c74cbf. This value is the source module's module ID.Click Save Component.
Configure the Plug-In Component
This Plug-In component retrieves the submissions to display in your dashboard.
Drag and drop a Plug-In component inside your
panelDashboardPanel component, below themoduleIdHidden component.In the Property ID and Canvas Label Text fields, enter
pluginGetSubmissions.From the Internal Services drop-down, select List Submissions for Dashboard. The Request Type and Data Source URL autopopulate.
In the Inputs table, enter the following:
Property ID
Mapping
moduleId
moduleId
'firstName,middleName,lastName,email,dateOfBirth'
fields
'investmentAmount,transferringBank'
fields
The first row references the module ID stored in the
moduleIdHidden component. The second and third rows show which fields you'll display in the dashboard. Here, we'll retrieve thefirstName,middleName,lastName,email,dateOfBirth,investmentAmount, andtransferringBankfields. The values entered in the Mapping column (moduleIdandfields) are native values recognized by the Unqork platform.
Click Save Component.
Configure the Hidden Component
This Hidden component stores the submission ID.
Drag and drop a Hidden component inside your
panelDashboardPanel component, below thepluginGetSubmissionsPlug-In component.In the Property ID and Label Text fields, enter
submissionId.Click Save Component.
Configure the ViewGrid Component
Next, add a ViewGrid component to display your dashboard.
Drag and drop a ViewGrid component inside your
panelDashboardPanel component, below thesubmissionIdHidden component.In the Property ID field, enter
gridView.In the Canvas Label Text field, enter
View Grid.In the Inputs table, enter the following:
#
ID
Required
1
pluginGetSubmissions
(checked)In the Outputs table, enter the following:
#
ID
Mapping
1
submissionId
id
In the Display table, enter the following:
#
ID
Formula
Heading
1
firstName
First Name
2
lastName
Last Name
3
email
Email
4
investmentAmount
Investment Amount
5
transferringBank
Transferring Bank

In the Action field, enter
View.In the Event field, enter
View.Click Save Component.
Configure the Decisions Component
This Decisions component provides the trigger for your dashboard's View button.
Drag and drop a Decisions component inside your
panelDashboardPanel component, below the ViewGrid component.In the Property ID and Canvas Label Text fields, enter
ruleButtons.From the Trigger Type drop-down, select Watch.
In the Inputs table, enter the following:
#
Property ID
Type
Required
Silent
1
buttonClick
exact
(unchecked)
(unchecked)2
moduleId
exact
(unchecked)
(checked)3
submissionId
exact
(unchecked)
(checked)Every row in the Inputs table gets an associated column in the Conditionals table. If an input does not have a value in its Conditionals column, Unqork sets it to silent. In the next steps, you won't add values to the moduleId and submissionId columns. You'll only use these inputs in the panelDashboard_pageOpen conditional. So, you can mark these values as silent, or let Unqork do it for you.
In the Outputs table, enter the following:
Property ID
Type
panelDashboard
pageOpen
In the Conditionals table, enter the following:
buttonClick
panelDashboard_pageOpen
view
=concatenate('/#/display/',moduleId,'/', submissionId , '/',moduleId)
Click Save Component.
Configuration
Configure the Hidden Component
This Hidden component stores the value submissions, acting as a replica of the pluginGetSubmissions Plug-In component. You'll reference the submissions Hidden component in the Data Workflows you'll create next.
Drag and drop a Hidden component onto your canvas, placing it below the
panelDashboardPanel component.In the Property ID and Label Text fields, enter
submissions.Click Save Component.
Configure the Data Workflow Component
This Data Workflow creates a replica of the pluginGetSubmissions Plug-In component, stored in the submissions Hidden component. You'll reference the submissions Hidden component in your second Data Workflow.
Drag and drop a Data Workflow component onto your canvas, placing it below your
submissionsHidden component.In the Property ID and Canvas Label Text fields, enter
dwfProcessSubmissions.
Configure the Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
pluginGetSubmissions
Required
Yes
Source
Default
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
submissions
Action
value
Connect the output port (right) of the Input operator to the input port (left) of the Output operator.
Click Save Component.
Update the Plug-In Component
Next, you'll update the pluginGetSubmissions Plug-In component to add a Post Trigger. This trigger tells the dwfProcessSubmissions Data Workflow component to fire as soon as the Plug-In component retrieves submissions.
Open the
pluginGetSubmissionsPlug-In component’s configuration drawer.In the Post Trigger field, enter
dwfProcessSubmissions.Click Save Component.
Configure the Hidden Component
This Hidden component stores the KPI count that you'll create in your dwfKPI Data Workflow component. You'll use this value in your KPI widget.
Drag and drop a Hidden component onto your canvas, placing it below the
dwfProcessSubmissionsData Workflow component.In the Property ID and Label Text fields, enter
hiddenKpi.Click Save Component.
Configure the Data Workflow Component
Next, you’ll add your second Data Workflow component. This component counts your submissions using a Size operator. The result of your calculation displays in your KPI dashboard widget.
Drag and drop a Data Workflow component onto your canvas. Place it below the
hiddenKpiHidden component.In the Property ID and Canvas Label Text fields, enter
dwfKpi.Set the Trigger Type as Watch.

Configure the Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
submissions
Required
Yes
Source
Default
Configure the Size Operator
The Size operator counts the structure you input into it. In this example, it counts the number of arrays (values) from the submissions Input operator.
Drag and drop a Size operator onto your Data Workflow canvas. You don't need any configuration for this operator.
Connect the output port (right) of the Input operator to the input port (left) of the Size operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
hiddenKpi
Action
value
Connect the output port (right) of the Size operator to the input port (left) of the Output operator.
Click Save.
Configure the KPI Component
Lastly, you’ll add a KPI component to display the number of accounts on your dashboard.
Drag and drop a KPI component onto your canvas, placing it above the
panelDashboardPanel component.In the Property ID and Label Text fields, enter
kpiAccounts.In the KPI Title field, enter
Number of Accounts. This title displays above the KPI value on the dashboard.In the Inputs table, enter
hiddenKpi.
Click Save Component.
Save your module.
Here’s how your completed dashboard looks in the Module Builder:

Here’s how your completed dashboard looks in Express View:

Preconfiguration
In this how-to guide, you’ll learn how to add a KPI widget to your dashboard that displays the number of accounts (submissions). This example also includes steps for building a dashboard with an action button, and retrieves submissions from the following source module: https://training.unqork.io/#/form/5eb482f3c8368d0210c74cbf/edit.
These instructions assume you have a new Front-End module open, saved, and with a title.
Configure the Panel Component
This Panel component acts as a container for the components that follow.
In the Module Builder, drag and drop a Panel component onto your canvas.
In the Property ID field, enter
panelDashboard.Click Save & Close.
Configure the Initializer Component
This Initializer component triggers the Plug-In components that you'll set up later.
Drag and drop an Initializer component inside your Panel component.
In the Property ID and Canvas Label Text fields, enter
initStart.From the Trigger Type drop-down, select New Submission.
In the Outputs table, enter the following:
Source
Type
Value
pluginGetSubmissions
trigger
GO
.jpg)
Click Save & Close.
Configure the Hidden Component
This is the first of two Hidden components in this configuration. It stores the module ID of your source or submission module. You can retrieve the module ID from the source module’s URL as follows: https://training.unqork.io/#/form/5eb482f3c8368d0210c74cbf/edit.
Drag and drop a Hidden component inside your
panelDashboardPanel component, below the Initializer component.In the Property ID and Canvas Label Text fields, enter
moduleId.In the Default Value field, enter
5eb482f3c8368d0210c74cbf. This value is the source module's module ID.Click Save & Close.
Configure the Plug-In Component
This Plug-In component retrieves the submissions to display in your dashboard.
Drag and drop a Plug-In component inside your
panelDashboardPanel component, below themoduleIdHidden component.In the Property ID and Canvas Label Text fields, enter
pluginGetSubmissions.From the Internal Services drop-down, select List Submissions for Dashboard. The Request Type and Data Source URL autopopulate.
Complete the Inputs table as follows:
Property ID
Mapping
moduleId
moduleId
'firstName,middleName,lastName,email,dateOfBirth'
fields
'investmentAmount,transferringBank'
fields
The first row references the module ID stored in the
moduleIdHidden component. The second and third rows show which fields you'll display in the dashboard. Here, we'll retrieve thefirstName,middleName,lastName,email,dateOfBirth,investmentAmount, andtransferringBankfields. The values entered in the Mapping column (moduleIdandfields) are native values recognized by the Unqork platform.
Click Save.
Configure the Hidden Component
This Hidden component stores the submission ID.
Drag and drop a Hidden component inside your
panelDashboardPanel component, below thepluginGetSubmissionsPlug-In component.In the Property ID and Canvas Label Text fields, enter
submissionId.Click Save & Close.
Configure the ViewGrid Component
Next, add a ViewGrid component to display your dashboard.
Drag and drop a ViewGrid component inside your
panelDashboardPanel component, below thesubmissionIdHidden component.In the Label field, enter
View Grid.In the Property Name field, enter
gridView.In the Action field, enter
View.In the Event field, enter
View.In the Inputs table, enter the following:
ID
Required
pluginGetSubmissions
(checked)In the Outputs table, enter the following:
ID
Mapping
submissionId
id
In the Display table, enter the following:
ID
Formula
Heading
firstName
First Name
lastName
Last Name
email
Email
investmentAmount
Investment Amount
transferringBank
Transferring Bank

Click Save.
Configure the Decisions Component
This Decisions component provides the trigger for your dashboard's View button.
Drag and drop a Decisions component inside your
panelDashboardPanel component, below the ViewGrid component.In the Property ID and Canvas Label Text fields, enter
ruleButtons.Set the Trigger Type to Watch.
In the Inputs table, enter the following:
Property ID
Type
Required
Silent
buttonClick
exact
(unchecked)
(unchecked)moduleId
exact
(unchecked)
(checked)submissionId
exact
(unchecked)
(checked)Every row in the Inputs table gets an associated column in the Micro Decisions table. If an input does not have a value in its Micro Decisions column, Unqork sets it to silent. In the next steps, you won't add values to the moduleId and submissionId columns. You'll only use these inputs in the panelDashboard_pageOpen micro decision. So, you can mark these values as silent, or let Unqork do it for you.
In the Outputs table, enter the following:
Property ID
Type
panelDashboard
pageOpen
In the Micro Decisions table, enter the following:
buttonClick
panelDashboard_pageOpen
view
=concatenate('/#/display/',moduleId,'/', submissionId , '/',moduleId)
Click Save.
Configuration
Configure the Hidden Component
This Hidden component stores the value submissions, acting as a replica of the pluginGetSubmissions Plug-In component. You'll reference the submissions Hidden component in the Data Workflows you'll create next.
Drag and drop a Hidden component onto your canvas, placing it below the
panelDashboardPanel component.In the Property ID and Canvas Label Text fields, enter
submissions.Click Save & Close.
Configure the Data Workflow Component
This Data Workflow creates a replica of the pluginGetSubmissions Plug-In component, stored in the submissions Hidden component. You'll reference the submissions Hidden component in your second Data Workflow.
Drag and drop a Data Workflow component onto your canvas, placing it below your
submissionsHidden component.In the Canvas Label Text and Property Name fields, enter
dwfProcessSubmissions.
Configure the Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
pluginGetSubmissions
Required
Yes
Source
Default
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
submissions
Action
value
Connect the output port (right) of the Input operator to the input port (left) of the Output operator.
Click Save.
Update the Plug-In Component
Next, you'll update the pluginGetSubmissions Plug-In component to add a Post Trigger. This trigger tells the dwfProcessSubmissions Data Workflow component to fire as soon as the Plug-In component retrieves submissions.
Open the
pluginGetSubmissionsPlug-In component’s configuration drawer.In the Post Trigger field, enter
dwfProcessSubmissions.Click Save.
Configure the Hidden Component
This Hidden component stores the KPI count that you'll create in your dwfKPI Data Workflow component. You'll use this value in your KPI widget.
Drag and drop a Hidden component onto your canvas, placing it below the
dwfProcessSubmissionsData Workflow component.In the Property ID and Canvas Label Text fields, enter
hiddenKpi.Click Save & Close.
Configure the Data Workflow Component
Next, you’ll add your second Data Workflow component. This component counts your submissions using a Size operator. The result of your calculation displays in your KPI dashboard widget.
Drag and drop a Data Workflow component onto your canvas. Place it below the
hiddenKpiHidden component.In the Canvas Label Text and Property Name fields, enter
dwfKpi.From the Trigger Type drop-down, select Watch.

Configure the Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
submissions
Required
Yes
Source
Default
Configure the Size Operator
The Size operator counts the structure you input into it. In this example, it counts the number of arrays (values) from the submissions Input operator.
Drag and drop a Size operator onto your Data Workflow canvas. You don't need any configuration for this operator.
Connect the output port (right) of the Input operator to the input port (left) of the Size operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
hiddenKpi
Action
value
Connect the output port (right) of the Size operator to the input port (left) of the Output operator.
Click Save.
Configure the KPI Component
Lastly, you’ll add a KPI component to display the number of accounts on your dashboard.
Drag and drop a KPI component onto your canvas, placing it above the
panelDashboardPanel component.In the Property ID and Label fields, enter
kpiAccounts.In the KPI Title field, enter
Number of Accounts. This title displays above the KPI value on the dashboard.In the Inputs table, enter
hiddenKpi.
Click Save & Close.
Save your module.
Here’s how your completed dashboard looks in the Module Builder:

Here’s how your completed dashboard looks in Express View:
