eLabSDK.Inventory.Sample Class
Print labels
Constructor
eLabSDK.Inventory.Sample
        
            (
    
    - 
                        object
Parameters:
- 
                        objectObject
Example:
- 
var sample = eLabSDK.Inventory.Sample.create({ name: 'My Sample', sampleTypeID: 1, fnWhenReady: function(config, sample){alert('sample created with name ' + sample.getName())} });
Item Index
Methods
- eLabSDK.Inventory.Sample.create (STATIC) - creates a new sample and triggers the load function
- getBarcode - returns the barcode value of the current sample
- getDescription - returns the description value of the current sample
- getMeta - returns the meta value of the current sample
- getName - returns the name value of the current sample
- getNotes - returns the notes value of the current sample
- getPropertyByName - returns the value of the passed in propertyname
- getPropertyBySampleMetaID - returns the property object[] (key/value) by sampleMetaID
- getPropertyBySampleTypeMetaID - returns the property object[] (key/value) by sampleTypeMetaID
- initialize - innitialises the Sample class and loads a sample if during the init config data was passed through
- remove - removes the current sample
- save - saves the sample
- setDescription - sets the description string for the current sample
- setMeta - sets the meta key/value for the current sample
- setName - sets the name string for the current sample
- setNotes - sets the note string for the current sample
Methods
eLabSDK.Inventory.Sample.create (STATIC) - creates a new sample and triggers the load function
        
            (
        
            
        
    
    - 
                        config
- 
                        fnWhenReady
Parameters:
- 
                        configObject- 
                                    nameName
- 
                                    sampleTypeIDInt
- 
                                    storagelayerIDInt
- 
                                    locationString
- 
                                    quantityInt
- 
                                    quantity_amountInt
- 
                                    quantity_unitString
- 
                                    expirationString
- 
                                    altBarcodeIDInt
- 
                                    noteString
- 
                                    meta[{Objectvalue: "value", key: "test", type:'text'}] 
 
- 
                                    
- 
                        fnWhenReadyFunctioncalled when the Sample has actually been created. Place your code logic within this callback. First parameter is the original config object, second is the actual sample 
Returns:
New instance of eLabSDK.Inventory.Sample
getBarcode - returns the barcode value of the current sample
        ()
    
    getDescription - returns the description value of the current sample
        ()
    
    getMeta - returns the meta value of the current sample
        ()
    
    getName - returns the name value of the current sample
        ()
    
    getNotes - returns the notes value of the current sample
        ()
    
    getPropertyByName - returns the value of the passed in propertyname
        
            (
    
    - 
                        propertyname
Parameters:
- 
                        propertynameString
getPropertyBySampleMetaID - returns the property object[] (key/value) by sampleMetaID
        
            (
    
    - 
                        sampleTypeMetaID
Parameters:
- 
                        sampleTypeMetaIDInt
getPropertyBySampleTypeMetaID - returns the property object[] (key/value) by sampleTypeMetaID
        
            (
    
    - 
                        sampleTypeMetaID
Parameters:
- 
                        sampleTypeMetaIDInt
initialize - innitialises the Sample class and loads a sample if during the init config data was passed through
        
            (
    
    - 
                        sampleIDs
- 
                        fnWhenReady
Parameters:
- 
                        sampleIDsString
- 
                        fnWhenReadyFunction
remove - removes the current sample
        
            (
    
    - 
                        fnWhenReady
Parameters:
- 
                        fnWhenReadyFunction
save - saves the sample
        
            (
    
    - 
                        fnWhenReady
Parameters:
- 
                        fnWhenReadyFunction
setDescription - sets the description string for the current sample
        
            (
    
    - 
                        description
Parameters:
- 
                        descriptionString
setMeta - sets the meta key/value for the current sample
        
            (
    
    - 
                        sampleMetaData
Parameters:
- 
                        sampleMetaDataObjectkey,value
setName - sets the name string for the current sample
        
            (
    
    - 
                        name
Parameters:
- 
                        nameString
setNotes - sets the note string for the current sample
        
            (
    
    - 
                        note
Parameters:
- 
                        noteString
