Creating a business metric: Aggregation

If you have selected the Aggregation data source type, the following fields are available.

Heading

The following options are available to change a static header or title.

Function

Description

With this button, you remove the current header.

With this button, you select a header. In the list, you can find all texts available for the open app.

With this button, you change the text of the header.

 
Note

This text may appear in different locations. If you edit the text, it will be changed in all locations.

System texts cannot be edited.

Using this button, you can enter a new text.

  • The Key (ID) field is completed automatically and you do not have to change it.
  • You can enter the text in any of the languages which are available in SmartWe.

Data source

When creating the element, you can set which data records you wish to display in the Data source field.

Function

Description

All data records

If you select this value, all data records of the selected data record type are taken into account.

Linked data records

If you select this value, only the data records of the selected data record type which are linked with the currently opened data record are taken into account.

The following data sources can be selected.

Type of data source

Default name in the App Designer

Internal description

All data records

chartDataRecordType, for example, chartTodo

DataObjectMassData

Linked data records

chartDataRecordType, for example, chartDocument

LinkMassData

Data record type

Select the Data record type, for example, tasks.

Query parameters: Adjust filter

With the Adjust filter function, you can define comprehensive filter settings.

 
Note

Certain filter conditions cannot be applied if a mobile app is used in offline mode. This includes the link conditions, complex queries in expert mode, and all date jokers excluding: current week, current week+?, current week-?, yesterday, yesterday+?, yesterday-?, today, today+?, today-?, tomorrow, tomorrow +? and tomorrow-?.

The adjustments are available in two modes, the Standard mode and the Expert mode.

Function

Description

Default mode

If you click the Adjust filter button, you open the default mode.

In the default mode, you can define the same settings as in a view filter.

SmartWe Online Help: Filter

Expert mode

You select the expert mode via the button.

In the expert mode, you can define your filter conditions via a code.

  • For the filter criteria, you use the field names as defined in the Data record types area.
  • Possible relational operators: =, !=, <, >, <=, and >=
  • You can create chains of operators by using: and or or.
  • You can compare all fields with the following data types: string, boolean, decimal, and int.
 
Example

You would like to filter all tasks which have a value entered in the Priority field and which have not yet been completed. To do so, enter the following code:

Copy
PRIORITY != '' and WORKINGPERCENT < 100

For the Linked data records data source, you can add target to the field name:

Copy
target.PRIORITY != '' and target.WORKINGPERCENT < 100

Aggregation function

In the Aggregation function field, you can define the basis on which the data in a chart is displayed.

The following aggregation functions are available: Number of data records, Maximum, Minimum, Sum, and Average.

Automatic update after (in minutes)

The contents of specific elements can regularly and automatically be calculated anew. You can set the interval in the Automatic update after (in minutes) field.

If you select Never, then the element will only be updated when loading the page.

Background color

You can customize the color. To do so, enter a hexadecimal value or select a color from the color palette.

 
Note

SmartWePremium

After clicking this button you can enter a script.

Scripting in the App Designer