Field configuration

From MintHCM Wiki

Process Process:Analytics
Parent Step Process:Report Data
Title Field configuration
Sequence 3
Related To
Related Modules
Related Action

Main screen No screen

Short Description

Field configuration



Contains information about the path to the field, e.g. information about relationships that you need to go through to get to the field from the main module.



The name of the column that will be displayed in the report data view.


This option only applies to fields from modules other than the main module.
If the user selects the Required option here, the record will not be displayed if the relationship does not exist. If the user selects Optional, the record will be displayed regardless of whether there is a link.

Group by

Enabling grouping on a given field means that the report result lines will be combined into one line based on the value of that field.


This function allows to determine what happens to the values of a given field during combining several rows into one. The user has several options here:

  • Count (COUNT) - instead of displaying the field value, the values will be counted and their number will appear in the field. Blank values are ignored, they do not take part in the counting, so if any of the combined rows does not have a value in this field, it will be skipped.
  • Count Distinct (COUNT DISTINCT) - in this case, the number of unique values that were in this field when joining the rows will appear. As with Count, the null value is ignored. If a given field assumes one of five values and the user joins the rows in which only two of these five values will be used, then the value two will be displayed in this field (for normal counts the number of rows would be displayed), of course ignoring the empty values.
  • Maximum (MAX) - from all combined rows the largest value will be selected and it will be displayed in this field. The rules for selecting the highest value depend on the type of field, but generally apply to the same: for numbers it will be the largest number, for dates it will be the latest date (the youngest), for strings it will be the last value in ascending sort (from A to Z).
  • Minimum (MIN) - the function works in the same way as Maximum, except that it selects the minimum value.
  • Average (AVG) - the average value that appears in this field will be calculated from the available values. This function makes the most sense for numbers, while it does not apply to strings, and returns dates to dates, but additional formatting is needed.
  • Group Concat (GROUP_CONCAT) - the available values will be combined into one as plain text and will be separated by a comma, the order is not specified (usually it is the order in which records appear in the database); only unique values will be displayed, no duplicates.
  • Group Concat (asc) (GROUP_CONCAT ASC) - works like Group Concat, but the values will be sorted in ascending order.
  • Group Concat (desc) (GROUP_CONCAT DESC) - works like Group Concat, but the values will be sorted in descending order.

The function requires grouping on at least one field. If grouping is not enabled and the function is enabled, all report results will be combined into one (the function forces data grouping).

Function - Columns

Function - Options

Custom Function

The Custom Function allows you to enter the SQL query that will be executed to retrieve the value. We can run any SQL code here. The {t} code value is available to obtain an alias to the module's main table.

Custom Function

Value Type

The value type allows to call a function related to the entire data set. This function is called after loading data from the database, it is not included in the query. There are four functions that can be applied to the entire data set:

  • Sum (SUM),
  • Count (COUNT),
  • Average (AVG),
  • Cumulated.

The above functions work the same as for functions from the Function field, but in this case it is only about extracting the value of the given function in a given field, without affecting the records in the report results.

Next, we distinguish three types of calculations that can be performed using the value from the current row and the value obtained after applying the function to the entire data set:

  • % (P) - the percentage share of a given value (e.g. if the sum of a given field from all records adds up to 10 and a given row has a value of 2, then 20% will be displayed in the field),
  • Δ (D) - the result of subtracting the field value and the value obtained from the entire data set,
  • Cumulated (C) - subsequent records on the report results increase the static sum, the last record on the report will always contain the sum of values from all fields.

Value Type

Fixed Value

The user can enter any value into the fixed value. It will be displayed in every record.


The Formula field allows you to execute any PHP code for a given value. The PHP code result will appear in the field value. In addition, the returned string can contain HTML, which gives many different options, such as:

  • data coloring depending on the status,
  • calculation of additional logic,
  • dependency of the formula result on the configuration available on the server.


The formula sequence allows to specify the order in which formulas are to be executed for each field. If one of the fields uses a field that will be calculated by the other, then in the sequence of the field previously needed, it is enough to provide the number lower than the value in the same column for the field whose formula is to be calculated later. During processing, formulas with the specified sequence are first performed, then formulas are not executed in a specific order.

Sub sections

Mentioned in other articles