Skip to main content
Version: V2 (Ignition 8.1)

tamaki.mes.backup.compare.getKeyFields

Description

Returns the list of key field names that uniquely identify entities of the given entityType, looked up from the package's entityTypesToKeyFields constant. For example, locations is keyed by ["path"] and operations by ["name", "locationPath"].

Raises a TypeError if entityType is not a string, or a ValueError if it is not a recognised entity type.

Syntax

tamaki.mes.backup.compare.getKeyFields(entityType)

Parameters

ParameterTypeNullableDescription
entityTypeStringFalseThe entity type (for example locations, materials).

Returns

A List of String field names that uniquely identify entities of that type.

Code Examples

print(tamaki.mes.backup.compare.getKeyFields("operations"))
# ['name', 'locationPath']