The Seal Platform
WebsiteGet StartedContact Us
The Seal Platform
  • Website
  • Contact Sales
  • Logging in & System Requirements
  • Get Started Here
  • Moving to Seal
    • Migration
    • Implementation
  • Manage
    • Where do I start?
    • Creating Types
      • Documents
      • Work Done
      • Files
        • Extracting Fields with AI
      • Scripts
        • Writing Scripts with the Seal Module
        • Script Action Buttons
      • Charts
      • Converting Between Types
    • Adding Content and Fields
      • Computed Titles
      • Formatting Text
      • Formulas
      • Numbered Lists
      • Setting Assignees
      • Setting Out-of-Specifications
      • Setting Review Requirements
      • Submission Tables
    • Executing Types: Test Instances
    • Work Instructions
    • Change Sets
    • Active Versions
    • Training
    • API
  • Operate
    • Where do I start?
    • Re-executing Instances
    • Reviewing
  • MISC
    • Glossary
    • Inbox
    • Search Page and Saved Views
    • User Permissions and Roles
    • Tags
    • Github Integration
    • Change Management
    • Seal Changelog
  • Video Guides
    • Creating Templates
    • Creating and Reviewing Instances
    • Sending and Completing Trainings
  • Validation
    • Why do I need to validate my platform?
    • What is needed from my end for validation?
    • How is my system validated?
      • Baseline Validation
      • Configuration Validation
      • Compliance Validation
      • What about IQ, OQ, or PQ?
      • Automatic Revalidation
        • Change Controls
      • How do I know if my system is compliant to a standard?
        • Setting up your System
        • Performing Compliance Validation
    • GxP Validation for enterprise customers
    • Can I download a Validation Report?
      • Software Functionality Verification
    • Common Validation FAQs
  • Product Quality
    • Seal's Guarantee of Quality
    • Product Development Lifecycle
    • Platform Operation Tests
    • Incident Procedure
  • IT & Security Policies
    • Seal's Tech Stack
    • Data Storage and Security
    • Cloud Servers vs On-Premises File Servers
    • Data Backup and Disaster Recovery
    • Disaster Recovery Plan
    • Handling Confidential Data
    • Common IT FAQs
  • Regulatory Standards
    • 21 CFR Part 11
    • EU Volume 4 Annex 11
    • ISO 13485 Medical Devices
    • Clinical Laboratory Improvement Amendments (CLIA)
  • Support
    • Contact us
Powered by GitBook

Copyright © Seal 2025. All Rights Reserved.

On this page
  • Fields
  • Field Types
  • Title shortcut
  • Seal's AI Co-Pilot
  1. Manage
  2. Creating Types

Scripts

Last updated 1 month ago

Seal allows you to write and execute your own custom Python code within the platform, enabling powerful custom solutions and automations.

Scripts can contain code that can be then executed. This is useful for automating data transformation and creation. For example, scripts can ingest a machine output CSV file, do some data cleaning and other transformation, and store the results in Seal as Records.

Scripts enable you to transform your data in more powerful and flexible ways.

For general information about writing code in Seal, and the Seal Module — .

Fields

Fields are stored as an object called fields, keyed by the unique field names. Every field object has the following fields:

  • id - a unique UUID given to every field, so it can be referenced. When a Data Record is created from a Data Step, it will have the same fields with matching ids

  • the field's type

  • the field's dataType (usually the same as the type, but multiple field types may use the same underlying data type). type is how it appears in the UI, dataType refers to the underlying data type

  • value - the actual data. All field values are nullable - they are usually null in Data Steps (unless you want a default value for produced Records), and then populated in Data Records when a lab technician is doing data entry, for example.

  • config - certain field have additional config, for example specifying a number display format, or whether the field can contain multiple values.

For example:


  "fields": {
    "CSV file": {
      "id": "f1714b77-d081-4a1e-bfc4-427289fce204",
      "type": "REFERENCE",
      "value": [
        {
          "id": "e9a49732-49a0-4674-b683-c6991fac160a",
          "version": "12"
        }
      ],
      "config": {
        "allowMultiple": false
      },
      "dataType": "ENTITY"
    },
    "Group name": {
      "id": "0519bc74-7086-4ba2-b769-994b62a48945",
      "type": "STRING",
      "value": "A23-Z",
      "config": {},
      "dataType": "STRING"
    },
    "Sample weight": {
      "id": "70c33317-16ae-48b2-9907-fc5112677773",
      "type": "NUMBER",
      "value": 52.3,
      "config": {
        "format": "0.000"
      },
      "dataType": "NUMBER"
    }
  }

Field Types

The columns in the dataframe are converted to fields in each Record. Seal infers the field types based on the data provided:

Data shape
Field type

a number or None

NUMBER

a boolean

BOOLEAN

an ISO date string

DATE

an ISO datetime string (must be timezone aware)

DATETIME

a plain text string

STRING

an array of UUID strings

UPLOAD (i.e. an array of File ids)

an array of non-UUID strings

SELECT (a select field aka dropdown)

an array of {id, version} objects

REFERENCE (an entity reference field)

Expand this section to find out more about specific Field Type Configurations.

Type: NUMBER

Description: Numeric value.

Value: A valid JSON number or null.

Config:

format; // '0.X' | '0.00' | '0.000' | '0,0.00' | '0.0%' | '0.00%' | '0.0a' | 'SCI' | 'SCI3' | 'EU' | 'IND' | 'Rounded'

Type: STRING

Description: Text.

Value: A string or null. The string must be at least length 1 - to represent an empty value, use null.

Config: None


Type: BOOLEAN

Description: True/false.

Value: A JSON boolean or null.

Config: None

    "Checkbox": True

Type: DATE

Description: A date in ISO 8601 format.

Value: An ISO date string or null

Config: None


Type: DATETIME

Description: A datetime in ISO 8601 format, requiring a timezone.

Value: A timezone aware ISO datetime string or null

Config: "2025-02-18T14:10:30.815Z"

format // 'PPpp' | 'PPppp' | 'Pp' | "yyyy-MM-dd'T'HH':'mm':'ssXXX"Z | 'dd-MM-yyyy HH:mm:ss'

    "Time & Date": "2025-02-18T14:10:30.815Z"

Type: SELECT

Description: An array of enum-like strings. Displayed in the UI as a dropdown/select field with multiple options.

Value: An array of strings.

Config:

selectOptions // array of strings specifying the enum options
allowMultiple // bool, whether multiple values are allowed

    "Select": ["Option"]

Type: REFERENCE

Description: An entity reference field for referencing other entities (of any kind), including File entities for referencing files.

Value: An array of {id, version} objects.

Config:

allowMultiple // bool

    "Reference": [{ "version": '1', "id": "entity id"}]

Title shortcut

If the column name is 'title' in the dataframe, Seal will automatically output this as the title of the Record, rather than creating a field called 'title'.

Seal's AI Co-Pilot

Seal comes with a built in AI agent to write code for you. Navigate to the 'Co-pilot' tab on the right hand side, and start chatting with the AI to describe what you need. The AI is also able to de-bug and add to your existing code.

Note that the generated code may not fully be fit for your purpose - we recommend checking over the results.

see this page