Create a dashboard

Intro

The dashboard section is where you can view the data collected through the FieldPro app.


Dashboards

The dashboards are located in the dashboard section on the webapp.


There are folders in the Dashboard section. Each folder contains dashboards. A dashboard is a set of charts.

Folders

There is always a default folder. The good practice is to let the mobile dashboards in the default folder and to define specific folders for the web dashboards.

In the client profile, one can edit the dashboards section and create a folder by defining a name and description.

A. Go to the client profile

 

B. Edit the client profile clicking on the green pen

 

 

C. Click on “+” in the dashboard section

 

 

D. Define a name and a description

 

 

N.B. : One might not see immediately the new folder created. If there is no dashboard in the folder, it won’t appear in the Dashboard summary.

 

Dashboards

The dashboards are located in folders in the Dashboard section.
To create a dashboard, open a folder and click on the “+” .

 

 

Then, define:

  1. The dashboard type

  2. The title

  3. The description

  4. The folder

  5. The database type

  6. The scope

  7. Add a chart clicking on “+” (see Chart section : how to create charts)


To access to an existing dashboard profile or edit it, click on the green pen

 

Import / export a dashboard through a Json file

It is possible to download the structure of a dashboard by clicking on the download button at the bottom of the modal, then to upload it when creating a new dashboard. That will replicate all the parameters of the dashboards, charts, etc

Dashboard type

There are 4 types of dashboards:

  • Classical dashboard (Web only) : only display on the webapp

  • Classical dashboard (Mobile only): only display on the mobile in the dashboard section

  • Classical dashboard (Web and mobile) : display on the webapp and on the mobile in the dashboard section

  • Dashboard based on an item (Mobile): display on the mobile in the customer card

If you have a folder with dashboards that are in scope “Mobile only” or “Web and mobile” and no dashboards “Web only”, the external user won’t be able to see the folder. You need to add at least one “Web only” dashboard.


Folder

If no folder is defined, the dashboard will be added to the default folder. In the client profile, one can edit the dashboards section and create a folder by defining a name and description. (see 1.1.1. Folders)

Database type

There are two database types:

  • Optimetriks: based on Optimetriks table ie data collected by the mobile app and data from the webapp

  • Postgres: based on an external source to configure


Scope

There are two scopes possible:

  • Global: all the data is displayed, the only filters applied are those from the queries or those from the dashboard filter

  • Team: only the teams selected can access to the dashboard. Only the data linked to the teams selected is displayed. Once the Team scope is selected, one needs to select the teams linked to the dashboard

As an Optimetriks admin, you will see all the resources no matter the scope/teams selected for the dashboard. It will only change view for external accounts. 

Charts

 Components

 

Click on “+” to add a chart

Select the chart type

Configure the chart and write the SQL query


For each chart type, there is a configuration to make. The SQL query needs to return different value depending on the chart type.

Documentation to find the configuration and the way to write the SQL query for each chart type>here

Chart parameters

  • Chart title: how it will be displayed

  • Chart description: will only be displayed on the web app in the folder view

  • Total scorecard. Boolean. It impacts the charts on mobile only. Activate it to make the total scorecard for the chart appear. In the picture below, the total scorecard is the 32. If not activated, only the line chart will appear. The option to add a total scorecard only applies for the following chart types:

    • line chart

    • ML chart

    • bar chart

    • stacked bar chart

    • hor bar chart

    • pie chart

  • If this parameter is actived, the other one to fill is called “Scorecard legend”, in the example below “Total submissions”

  • Force the display of chart in full width. Boolean. Activate to have the chart be displayed on the full page, not half page. Only for the web dashboards.

  • Fill the chart with color. For web and mobile charts. On the left, a line chart with color, on the right, without.

  • Aggregator: Sum, Min, Max, Median, Mean, Boolean

Display order of the charts

The charts display on the dashboard in the order they display in the list in the dashboard profile.

For example, this order in the list displays in the same order on the dashboard.

To change the order of the charts, one need to drag and drop the chart in the chart list in the dashboard profile.


Scorecards and gauges are always displayed first.

Add alias-label mapping

This is to update how the label of the options for single or multiple choice attributes will appear in the charts.

The alias will be displayed in the chart, so that you don’t need to update the query.

 

Attached roles to query dashboards

If you have defined web user roles in the client set up, you can select them here. If you select a role, it means only web users with that role will be able to view this dashboard.

SQL QUERIES


In order to write the SQL queries for the charts, one needs to understand how the data is stored in Optimetriks database and how to find the right fields to use.

There are three types of tables:

  • Generic tables: mobile_users, webapp_users, …

  • List tables: the name of the list table is l_ + list_id
    The list id can be found in the list section.
    For example, if the list id is gdhdjsksqoqd, the table in which the information is stored is l_gdhdjsksqoqd

  • Workflow tables:
    The name of the workflow table is w_ + list_id
    The list id can be found in the workflow section.

    For example, if the list id is pmslskdsskd, the table in which the information is stored is w_pmslskdsskd

Tables, name of the fields and mapping can be found in the documentation here