Activity Metrics
Configure visual key performance indicators.
Now that all forms have been created, we can configure the activity metrics to show key performance indicators (KPI's) and allow end-users to drilldown into some forms.
The activity metric KPI's can be shown in both of these places:

Clicking on a metric can open a form.
We will start by creating the data source requests to pull KPI's from ReST API's.
Create Teams Data Source Request
Open App Studio, then open the Data Sources configurator.
Create a new folder beneath the Football
folder called Counters
:

Then create a new request inside this new folder:

Give this first activity metric the name Teams
, and save it:

Copy the ReST API Teams KPI function URL:
https://football-891b.restdb.io/views/CountTable?Table=Teams
Paste this into the URL:

The Authorisation should always default to "Inherit from parent".
Send Request
To test this, click the Send Request button and get the list of fields and data. We can see on the Results tab that the JSON data returned shows the count from the ReST API:

Create Activity Metric
Open App Studio, then open the Activity Metrics configurator:

Add Metric
Click this button to open this modal popup:

Type the name: Clubs/Teams
and press the Save button. The new activity metric will be created and its properties are displayed:

Assign Data Source Request to Metric
Click the Data Source Request database button to choose the above data source request. This will then show after pressing the Select button:

Open App Studio, then open the App Toolbar configurator. Select the Search ... item in the Toolbar Elements panel:

Click this button to select the above data source request from the modal popup. The assigned data source request should now look like this:

Set Properties
Set these other properties:
Description
Make this as descriptive as possible for future designers and end-users.
Drill Down Form
If the activity metric is to be used as a hyperlink to a form, then choose the form in this drop down list. When the end-user clicks the KPI, the form will open.
Locked
Check this to prevent it being edited by other designers.
Caption
This is the text which will appear to the left of the KPI when displayed.
Tooltip
This is the popup text which appears when the end-user hovers their mouse over the KPI. This should speak their language to inform them what this number means.
Icon
The icon displayed to the left of the caption can be selected using the button on the right.
Style
There are limited styles associated with each KPI:

The blue, green, grey, red and yellow are respectively the 'Bootstrap' colours for info, success, default, danger and warning. Themed is the colour chosen in User Options.
Visible
Check this if the KPI should be visible. Each KPI can also be shown or hidden for specific users using the security configurator.
Apply & Close
Apply & Close your changes to persist this configuration.
The application will reflect your changes as shown in this example:

Here we can see that the new Clubs/Teams metric/KPI is showing the count of 24 obtained from the ReST API.
Clicking the KPI will open the Clubs/Teams lookup form.
Add Additional Metrics
We can now repeat the process for 3 additional metrics:
Footballers
Name
Footballers
Description
Count of footballers
Data Source Request URL
https://football-891b.restdb.io/views/CountTable?Table=Players
Drill Down Form
FootballerSearchPagination
Locked
Unchecked
Caption
Footballers
Tooltip
Number of football players
Icon
Ball
Style
Yellow
Visible
Checked
Nationalities
Name
Nationalities
Description
Count of nations
Data Source Request URL
https://football-891b.restdb.io/views/CountTable?Table=Nationality
Drill Down Form
Nationalities
Locked
Unchecked
Caption
Nationalities
Tooltip
Number of nations
Icon
Globe
Style
Blue
Visible
Checked
Positions
Name
Positions
Description
Count of positions
Data Source Request URL
https://football-891b.restdb.io/views/CountTable?Table=Position
Drill Down Form
Locked
Unchecked
Caption
Positions
Tooltip
Number of player positions
Icon
Dice
Style
Themed
Visible
Checked
Test
After all 4 activity metrics have been added, they should look like this:

Test that data is returned as expected, and that clicking each KPI loads the correct form if configured.
Last updated