ecl-logo Documentation

Upload

Upload[packet]object

creates object of packet key Type, or modifies existing object of packet key Object.

Upload[packets]objects

sequentially creates or modifies the elements of packets.

Details

  • Append[myField] -> add a new value to myField.
  • Replace[myField] -> remove existing elements of myField, and set myField with the provided data.
  • Erase[myField] -> delete a row, row-column pair, or nested list of rows from myField.
  • EraseCases[myField] -> delete any element of myField that matches the value.
  • The keys for multiple fields must be wrapped in Append or Replace to denote whether to append to that field or replace it entirely.
  • Any delayed rules in a packet will be ignored.
  • Upload will fail if any fields being modified are specified as rules and are computable fields (see LookupTypeDefinition to investigate field types).
  • Input
    Output
    General Options
    Messages
  • BadTransferAttempted to Transfer to field(s) `1` to `2` in object(s) `3`. Can only Transfer to a Notebook with a link to the Objects field of a LaboratoryNotebook.
    BigDataFieldThere was an error with big data field `1`: `2`.
    ComputableFieldThe following field(s) `1` in type(s) `2` at indices `3` are computable, and cannot be uploaded.
    EmptyNameEmpty string provided for Name in packets `1`. Please provide the Name field with a unique name of 1 or more characters in length.
    EraseDimensionErase specification(s) `1` at indices `2` contain rows and columns, but the field(s) `3` are 1 dimensional.
    ErasePatternPart(s) `1` at indices `2` are not valid erase parts. Erase parts must be specified as a row, row-column pair, or nested list of rows.
    Error`1`
    FieldStoragePatternThe following field(s) `1` do not match their storage pattern(s) for objects `2` at indices `3`.
    InvalidOperationThe following operation(s) `1` at indices `2` are not valid. Valid operations are in the form Append[field], Replace[field], Erase[field], EraseCases[field], Transfer[Notebook], or field.
    MissingLinkIDThe link ID `1` specified in field `2` for object `3` at index `4` is missing its backlink. To create this link do not specify a link ID and Upload will generate one automatically.
    MissingObject`1`
    MultipleFieldThe following field(s) `1` are multiple fields and must be specified as Replace[Field], Append[Field] or Erase[Field] for objects `2` at indices `3`.
    NamedFieldThe following named field(s) `1` for objects `2` at indices `3` require associations.
    NamedMultipleFieldThe following named field(s) `1` for objects `2` at indices `3` require associations or lists of associations.
    NameStartsWithIdName in packets starts with id: `1`. Please remove prefix and provide the Name field with a unique name.
    NonUniqueLinkID`1`
    NonUniqueName`1`
    NoObjectFields `1` in change packets at indices `2` are specified as Erase, but did not have Object specified. Cannot erase values from new objects.
    NoSuchFieldThe following fields(s) `1` are not present in the types `2` at indices `3`.
    NoSuchTypeUnknown type(s) `1` at indices `2`.
    NotAllowedUser does not have permission for these changes
    ObjectsFieldChange packets at indices `1` specify the Objects field. The Objects field of an Object[LaboratoryNotebook] cannot be modified directly via Upload.
    PartDoesntExist`1`
    RepeatLinkID`1`
    SingleEraseCasesThe following field(s) `1` in change packets at indices `2` are single fields and do not support EraseCases.
    SingleEraseFieldThe following field(s) `1` are single non indexed fields, and can not be operated on by Erase for object(s) `2` at indices `3`.
    TypeNotSpecifiedThe packet(s) at indices `1` must have Type or Object specified in order to modify or create new object.

Examples

Basic Examples  (5)

Append[field] adds to existing values in an object:

Create an object:

Create multiple objects at once:

Modify existing objects by specifying the Object key in an Association:

Updates are applied in-order so subsequent replaces overwrite previously appended values:

Additional Examples  (32)

Append a single value to a multiple field:

Boolean fields work and return BooleanP:

Create a model object:

Exrpressions get written and read out correctly:

Pre-created Object IDs can be used in indexed multiples:

Prepend a single value to a multiple field:

Returns an empty list when given an empty list:

BigData  (1)

Uploading BigData fields work:

BigDataQuantityArray  (1)

Uploading BigDataQuantityArray fields work:

Compressed  (1)

Compressed fields yield the same thing coming out as going in:

Erase  (6)

A row can be deleted from a Multiple field:

Delete a column from all rows in a named multiple field:

Delete a column from all rows in an IndexedMultiple field:

Delete a specific index in an IndexedSingle field:

Delete from an IndexedMultiple a specific row and column:

Multiple rows can be deleted from a Multiple field:

EraseCases  (1)

Delete all values in a multiple field which match the literal value specified:

Links  (3)

Links can go one way if they are so defined:

Links can refer to Objects by Name:

Use pre-created Object IDs to create objects and link them together all in one Upload call:

NamedFields  (1)

Upload named fields:

QuantityArray  (5)

Append to a QuantityArray field:

Insert a list of QuantityArrays into a multiple field:

Insert a list of QuantityArrays into a multiple field and convert their units:

QuantityArray expressions can be used as values, and will be converted:

QuantityArrays convert complex indexed multiples:

RuleDelayed  (1)

Ignores an fields which are RuleDelayed:

TemporalLinks  (2)

Field Pattern permitting, links can be uploaded to fields of the TemporalLink class:

Uploading Temporal Links to a link class will fail, even if the Field pattern accepts a Temporal Link:

Transfer  (1)

Super users can transfer objects to different notebooks:

Units  (1)

Units are converted on Upload:

VariableUnit  (1)

Data can be uploaded to VariableUnit fields:

Options  (4)

ConstellationMessage  (2)

Only print newly created objects of the specified types:

Print all created objects:

Transaction  (1)

Transaction->_String creates a unique transaction for the Upload call:

Verbose  (1)

Verbose->False turns off the progress/completion messages:

Messages  (30)

BadTransfer  (1)

Transferring a field other than Notebook returns $Failed and provides a message:

BigDataField  (1)

Upload failures relatively gracefully when binary encoding fails:

ComputableField  (1)

Throws a message and returns $Failed if any fields specified as rules are computable:

EmptyName  (1)

Uploading an object with an empty name returns $Failed and provides a message:

EraseDimension  (1)

Erase part specification must have dimension corresponding to the field:

ErasePattern  (1)

Erase must correspond to an erase part specification:

Error  (1)

Returns $Failed and displays a message if there was a problem communicating with the server:

FieldStoragePattern  (3)

Data must match the pattern of the corresponding field:

Links must point to the correct field:

When using EraseCases, value to be deleted must match the storage pattern for the field:

InvalidOperation  (1)

Provides a message and returns $Failed for operations that are not Append, Replace or Erase:

MissingLinkID  (1)

Return $Failed and provide a message for one way links with ids:

MissingObject  (1)

Trying to Upload to a non-existent Object throws an error and returns $Failed:

MultipleField  (1)

Multiple fields must be wrapped in either Replace, Append or Erase:

NamedField  (1)

Uploading a list to a named field provides a message and returns $Failed:

NamedMultipleField  (1)

Uploading a list of lists to a named multiple field provides a message and returns $Failed:

NameStartsWithId  (1)

Uploading an object with a name that starts with id: returns $Failed and provides a message:

NonUniqueLinkID  (1)

A link id must not already exist in the database:

NonUniqueName  (1)

Uploading an object with a name that already exists returns $Failed and provides a message:

NoObject  (1)

Packets with Erase operator must reference specific Object:

NoSuchField  (1)

Change packets must have fields that exist in their types:

NoSuchType  (1)

Change packets must use an existing type:

NotAllowed  (1)

Performing an operation you do not have permission for returns $Failed and provides a message:

ObjectsField  (1)

The Objects field of a LaboratoryNotebook cannot be modified directly:

PartDoesntExist  (1)

Deleting a section that does not exist provides an error message:

RepeatLinkID  (1)

Manually generated link ids must point at each other:

SingleEraseCases  (1)

EraseCases can only be used with multiple fields:

SingleEraseField  (1)

Single non indexed fields must not be wrapped in Erase:

Timeout  (1)

Upload must complete within a certain amount of time:

TypeNotSpecified  (1)

Change packets must have either Object or Type key:

Last modified on Fri 26 Aug 2022 21:52:19