Meaning of the _mockPk Column

What is the meaning of _mockPk column?

This virtual field is included in the general entity interface (IAsapEntity2). Please note that it has ExcludeFromAllFields set to True so it is not generally used unless you explicitly add it to a data structure.

It is also configured with AutoIncrement set to True and PrimaryKey set to True.

All this combined results in the following behavior: When data are loaded from the database such a field is loaded with unique numbers, making a virtual primary key.


You can (or should) use this field e.g. in case of aggregated queries where you use aggregations in data structures. In such cases you cannot include the primary key in the listed columns (otherwise no groupings will occur) but the GUI needs a primary key in order to display the data. So you include instead the _mockPk which will provide a virtual primary key for the loaded data to be used in the GUI.