Sepasoft MES Module Suite
remove(sampleUUID)
Remove a single sample from SPC use. A sample can be removed at any point in its life cycle: after it has been scheduled and before measurements are recorded, and after measurements have been recorded.
The sample is permanently removed from Location Sample List, charts, and scripting APIs, including getSample. It cannot be recovered. In MES 3.81.13 SP2, MES 4.83.3 SP2, and later, a removed sample does not appear in the list as a row with an empty definition.
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.
Calling remove again for a sample that is already removed does not raise an error. The sample stays absent from the list.
Syntax
Python |
system.mes.spc.sample.remove(sampleUUID) |
Parameters
String sampleUUID — The UUID of an existing sample to remove.
Returns
Nothing
Scope
All
Code Example
Python |
system.mes.spc.sample.remove('88a6b6a4-3177-4759-b594-7220d416c735') |
Related Functions
- system.mes.spc.sample.purgeSampleData(defUUID, priorToDate) — Removes every sample for one sample definition taken on or before a cutoff date. The same removal rules apply.
- system.mes.spc.sample.exclude(sampleUUID) — Excludes a sample from charts. The sample remains in SPC.
- system.mes.spc.sample.getSample(sampleUUID) — Returns
Nonefor a sample that has been removed.
Sepasoft MES Module Suite