Dataset JS Object
Last updated on 13-Mar-2018 by Thomas P. Boesen

The Dataset object is used for transferring data between different components in the JavaScript part of Scifeon. It is also used for returning data from the Query API endpoint
A simple Dataset object looks like this:
{
content: [
{ name: 'samples', type: 'collection', eClass: 'Sample' },
{ name: 'queryResult', type: 'collection', item: 'Row', rows: [ {}, {} ] }
],
samples: [
{ eClass: 'Sample', id: 'S123', type: 'Other', status: 'Initial', format: 'Vial', ... }
]
}
The content
array contains a list of keys in the Dataset dictionary. The value for a key can be one of the following types:
- Collection
- Entity
- Scalar / Number / String
- Spreadsheet
- Lookups
- Field changes
A Dataset object used for uploading data to the Save API endpoint can have the following keys:
{
content: [
{ name: 'newEntities', type: 'collection' },
{ name: 'lookups', type: 'lookups' }
]
}