Sepasoft MES Module Suite
Before a new sample is added or an existing sample is updated to the database, any script in this event is run. This includes samples that have been scheduled with no measurement data. It is provided to allow for the addition of more information, performing other actions or preventing the saving of the sample.
Event Methods
getSample()
Description
Returns the new or updated sample. (See Sample section for more information).
Syntax
getSample()
- Parameters
None
- Returns
Sample sample - The new or updated sample.
setCancelUpdate(cancelUpdate)
Description
Used to prevent the sample from being added or updated.
Syntax
setCancelUpdate(cancelUpdate)
- Parameters
boolean cancelUpdate - The default is false, meaning the sample will be added or updated. It is provided to override the default adding or updating of samples and should be used with caution.
- Returns
Nothing
isCancelUpdate(cancelUpdate)
Description
Returns the current state of the cancel update flag.
Syntax
isCancelUpdate()
- Parameters
None
- Returns
boolean cancelUpdate - True, if the current state of the cancel update flag is true and False otherwise.
Code Example
Code |
|
Sepasoft MES Module Suite