Learn R Programming

Rlabkey (version 3.5.1)

labkey.storage.update: Update a LabKey Freezer Manager storage item

Description

Update an existing LabKey Freezer Manager storage item to change its properties or location within the storage hierarchy. Storage items can be of the following types: Physical Location, Freezer, Primary Storage, Shelf, Rack, Canister, Storage Unit Type, or Terminal Storage Location.

Usage

labkey.storage.update(baseUrl=NULL, folderPath, type, props)

Value

A list containing a data element with the property values for the updated storage item.

Arguments

baseUrl

a string specifying the baseUrlfor the LabKey server

folderPath

a string specifying the folderPath

type

a string specifying the type of storage item to update

props

a list properties for the storage item (i.e. name, description, etc.), must include the RowId primary key. May also include an optional auditUserComment entry, which is recorded as the "Reason" on the resulting audit event.

Author

Cory Nathe

See Also

labkey.storage.create, labkey.storage.delete

Examples

Run this code
if (FALSE) {

library(Rlabkey)
## create a storage unit type and then update it to change some properties

plateType = labkey.storage.create(
    baseUrl="http://labkey/",
    folderPath="home",
    type="Storage Unit Type",
    props=list(name="Test 8X12 Well Plate", unitType="Plate", rows=8, cols=12 )
)

plateType = labkey.storage.update(
    baseUrl="http://labkey/",
    folderPath="home",
    type="Storage Unit Type",
    props=list(rowId=plateType$data$rowId, positionFormat="NumAlpha", positionOrder="ColumnRow" )
)

## include an auditUserComment in the props list to attach a "Reason" to
## the audit log record for this update
plateType = labkey.storage.update(
    baseUrl="http://labkey/",
    folderPath="home",
    type="Storage Unit Type",
    props=list(
        rowId=plateType$data$rowId,
        description="Switched to AlphaNum positions",
        auditUserComment="Switching to AlphaNum positioning per lab SOP-42"
    )
)
}

Run the code above in your browser using DataLab