Sepasoft MES Module Suite
system.mes.spc.sample.purgeSampleData(defUUID, priorToDate)
Purge samples for one sample definition that were taken on or before priorToDate.
Purged samples are permanently removed from Location Sample List, charts, and scripting APIs, including getSample. They cannot be recovered. In MES 3.81.13 SP2, MES 4.83.3 SP2, and later, a purged sample does not appear in the list as a row with an empty definition.
Purge is permanent
|
The samples are permanently deleted and cannot be recovered. |
History rows may remain with null values so enterprise synchronization can propagate the removal. Those rows are not restored as active samples. A query of MESSampleDefinitionUUIDValue or MESSampleAttributeValue can still show the SampleUUID with a null Value.
A blank defUUID raises The defUUID parameter is required.
Syntax
system.mes.spc.sample.purgeSampleData(defUUID, priorToDate)Parameters
String defUUID — Sample definition UUID whose samples are removed from SPC use.
Date priorToDate — The cutoff date. Samples entered on or before this date are removed from SPC use.
Returns
Nothing
Scope
All
Code Example
Python |
defUUID = '931f7d3c-b214-44cf-a4b4-c6a5e75c5e11' priorToDate = system.date.now() system.mes.spc.sample.purgeSampleData(defUUID, priorToDate) |
Related Functions
- system.mes.spc.sample.remove(sampleUUID) — Removes one sample. The same removal rules apply.
- system.mes.spc.sample.getSample(sampleUUID) — Returns
Nonefor a sample that has been purged.
Sepasoft MES Module Suite