Dynamic Schema

  • Release version: Australia
  • Updated March 12, 2026
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Dynamic Schema

    Dynamic Schema allows you to define a flexible hierarchy of categories and attributes to describe records in your ServiceNow environment. This capability helps organize metadata without the need to add new columns to tables, enabling dynamic data capture and reuse across multiple tables using dynamic namespaces.

    Show full answer Show less

    Key Features

    • Dynamic Attributes: These are name-value pairs that describe records and can be defined formally or created transiently as needed.
    • Dynamic Categories: Containers that organize dynamic attributes, allowing inheritance from parent categories.
    • Dynamic Attribute Store: A field type for storing dynamic attributes and values, automatically creating a dynamic namespace for associated fields.
    • Dynamic Namespace: A scoped collection of dynamic attributes and categories, allowing for the reuse of attributes across multiple fields.
    • Implementation Flexibility: Attributes can be added directly without prior definitions, and can be modified at any time without affecting stored data.

    Key Outcomes

    By leveraging Dynamic Schema, you can:

    • Capture and store diverse attribute-value pairs relevant to records, such as product specifications in a custom Products table.
    • Utilize transient attributes for immediate data capture, which can later be defined for enhanced functionality.
    • Enhance data filtering and management using dynamic schema elements in workspaces, improving efficiency in operations like transaction searches.
    • Access and manage dynamic attributes programmatically through various global APIs, facilitating integration and automation within your ServiceNow instance.

    Define a hierarchy of categories and enable users to describe a record using one or more attributes.

    Key benefits

    • Organize and define metadata in a flexible schema instead of adding new columns to a table.
    • Capture data dynamically using different attributes per record.
    • Define a structured framework of dynamic categories and dynamic attributes.
    • Define dynamic categories and dynamic attributes once and reuse them across multiple tables using dynamic namespaces.

    Dynamic Schema elements

    Dynamic Schema is composed of the following elements.

    Dynamic attributes
    Name-value pairs that describe a record. You can either formally define dynamic attributes or create them on the fly as transient attributes in a dynamic attribute store field.
    Dynamic categories
    Containers for organizing dynamic attributes. A dynamic category can inherit dynamic attributes from its parent category.
    Dynamic attribute store
    A field type for storing one or more dynamic attributes and their values. When you create a dynamic store field, a dynamic namespace is automatically created and associated with that store field.

    After creating a store field, you can start storing values for attributes without defining them, or you can specify attribute definitions in the dynamic namespace to take advantage of additional functionality.

    Dynamic namespace
    A scoped collection of dynamic attributes and dynamic categories. Each dynamic attribute store field automatically receives its own dynamic namespace or you can configure multiple dynamic attribute store fields that share a dynamic namespace.

    Implementation options

    You have flexibility when deciding how to implement Dynamic Schema.

    • You can add attributes directly to a dynamic attribute store field without creating formal definitions first. These attributes are considered transient and are treated as having string values in scripts and queries. You can provide a definition for the attribute and modify its type at any time. Modifying the type of an attribute doesn't affect the stored data but changes how the system interacts with that data. See Working with attributes transiently.
    • You can take advantage of additional platform support and reuse for attributes by defining them in a dynamic namespace. Defining a dynamic attribute record enables you to specify its type, set choice options, organize it into dynamic categories and more. See Working with Dynamic Schema.
    • You can create a dynamic namespace independently. You can add dynamic attributes and dynamic categories to that namespace, and then associate that namespace with one or more dynamic attribute store fields. This enables you to reuse attributes across multiple store fields. See Create a dynamic namespace.

    Use cases

    • Capture attribute-value pairs that describe products sold in a large department store by defining a dynamic schema for your products. Store the attributes and their data in a dynamic attribute store field.

      For example, assume you have a custom Products table that stores records for different types of products like televisions, sunscreens, pillows, and shirts. You can create dynamic attributes for each type of product (like screen type, UPC, color, or size). You can organize the dynamic attributes into dynamic categories (like Electronics, Health and Beauty, Home Goods, and Clothing). Users can add records to your Products table and capture different attributes in each product record.

    • Describe a record by capturing one or more transient attributes, with values stored as string objects in a dynamic attribute store field. You can also capture transient attributes on a record by adding a dynamic attribute store field to a table and populating the field with string data using the GlideRecord API.
    • Filter Workspace lists using dynamic schema elements in the condition builder. For example, you can define dynamic categories and attributes for product offerings and use them to search for transactions using the condition builder in the Sales Order Management Workspace.

    APIs

    Dynamic Schema also provides global APIs that enable you to access and manage dynamic attributes in your tables using JavaScripts. The following lists the APIs and methods that support dynamic attributes.