Sepasoft MES Module Suite
getChangelogData(filter)
The getChangelogData script function makes a blocking request that returns changelog history as an Ignition Dataset. This is useful when the result needs to be bound directly to a table component or processed using Ignition's dataset utilities. Use a MESChangelogFilter (created with system.mes.changelog.createFilter()) to narrow the results.
Syntax
system.mes.changelog.getChangelogData(filter)
Required Parameters
Parameter | Type | Description |
|---|---|---|
filter | The filter object defining search constraints. Create one with system.mes.changelog.createFilter(). Cannot be None. |
Return Value
Type | Description |
|---|---|
Dataset | An Ignition Dataset representing the changelog history. Each row corresponds to a change event record. Returns an empty dataset when no records match the filter. |
| Dataset Column | Type | Description |
|---|---|---|
Date/Time | Date | When the change was recorded. |
MES Object Name | String | The object's current name. |
Historical Name | String | The object's name at the time of that row. The column is present when With |
MES Object UUID | String | The object's UUID. |
Change Event Type | String | The kind of change. |
Property Path | String | The property that changed. |
Old Value | String | The value before the change. |
New Value | String | The value after the change. |
Source | String | The gateway location where the change was made. |
Changed By | String | The person name recorded for the change. |
Scope
Context | Availability |
|---|---|
Client | Available in Vision Client and Designer scripts |
Gateway | Available in Gateway-scoped scripts |
Example Usage
Python |
# Minimal — retrieve all changelog records as a Dataset changelogFilter = system.mes.changelog.createFilter() data = system.mes.changelog.getChangelogData(filter=changelogFilter) # Realistic workflow — filter by user and populate a table component changelogFilter = system.mes.changelog.createFilter() changelogFilter.setChangedByNames("jsmith", "System") changelogFilter.setDescending(True) changelogFilter.setLimit(200) data = system.mes.changelog.getChangelogData(filter=changelogFilter) event.source.parent.getComponent("ChangelogTable").data = data |
Python |
changelogFilter = system.mes.changelog.createFilter() changelogFilter.setMESObjectUUIDs('adc792ed-fce1-4fb2-80ae-fb249fc43b37') changelogFilter.showHistoricalNames(True) data = system.mes.changelog.getChangelogData(changelogFilter) for row in range(data.getRowCount()): print data.getValueAt(row, 'MES Object Name'), data.getValueAt(row, 'Historical Name') |
Sepasoft MES Module Suite