Sui.

Post

Share your knowledge.

MoonBags.
Jul 28, 2025
Expert Q&A

there are no more references to Dynamic Field nor Table/Bag

Hello, seems that the Sui doc is broken, there are no more references to Dynamic Field nor Table/Bag in the Concepts like they were previously, although the AI still knows about them. I couldn't find the pages using the Search function nor information about these: https://docs.sui.io/concepts/dynamic-fields

  • Sui
3
10
Share
Comments
.

Answers

10
Meaning.Sui.
Jul 28 2025, 03:38

Dynamic Fields, Table, and Bag

Dynamic Fields allow you to extend objects with additional fields at runtime. Table and Bag are collection types built on top of dynamic fields: Table: A homogeneous key-value map (Table<K, V>) where all keys and values are of the same type. Bag: A heterogeneous collection that can hold key-value pairs of arbitrary types.

Table Example (from context)

module sui::table;
public struct Table<K: copy + drop + store, V: store> has key, store { /* ... */ }
public fun new<K: copy + drop + store, V: store>(
    ctx: &mut TxContext,
): Table<K, V>;

Bag Example (from context)

module sui::bag;
public struct Bag has key, store { /* ... */ }
public fun new(ctx: &mut TxContext): Bag;
7
Best Answer
Comments
.
Arnold.
Arnold3036
Jul 28 2025, 11:02

Dynamic Fields and Tables still exist in Sui but were moved from the Concepts section. You'll now find them in:

  1. Move Documentation - Under object ownership and custom types
  2. CLI Reference - Via sui client dynamic-field --help
  3. Move Examples - In the Sui GitHub repo's sui_programmability/examples

For immediate needs:

  • Dynamic Fields docs are now at docs.sui.io/build/move/object-dynamic-fields
  • Tables/Bag docs are under collections in Move examples

The functionality remains the same - just reorganized in the docs.

5
Comments
.
Alya.
Alya-14
Jul 30 2025, 17:44

The Dynamic Fields and Tables/Bag documentation has been moved from the "Concepts" section to the Sui Move section of the developer documentation.

You can find the updated content here:

These collections are still fully supported on Sui and are widely used for scalable on-chain data structures. The reorganization reflects a shift to grouping content by development workflow rather than removing the features.

For production use:

  • Use Table for large, homogeneous key-value stores (gas-efficient, supports iteration).
  • Use Bag for heterogeneous collections or when you need to store different value types.
  • Use dynamic object fields when you need child objects to remain independently accessible via their ID.

The original URL now redirects, but you can access the content directly via the build/move paths.

5
Comments
.
Owen.
Owen4662
Jul 30 2025, 03:02

The documentation for Dynamic Fields, Tables, and Bags has been moved and is now available under the "Concepts" section of the Sui documentation. The correct URL is https://docs.sui.io/concepts/dynamic-fields. This page explains dynamic fields, including fields and object fields, how to add, access, and remove them, and their use in collections like Tables and Bags. The content is intact and accessible via the provided link.

4
Comments
.
Thorfin.
Jul 30 2025, 06:55

Dynamic Fields and Dynamic Object Fields are part of the Sui framework (sui::dynamic_field and sui::dynamic_object_field) and still exist, but the official docs no longer expose Dynamic Fields or the Table/Bag collections under the "Concepts" navigation, though they remain available in reference modules

3
Comments
.
theking.
Jul 30 2025, 10:49

Sui offers two main dynamic field modules: sui::dynamic_field, which lets you add arbitrary value types (like u64, bool, vector<u8>, or custom structs) as fields to an object; and sui::dynamic_object_field, which attaches object types (with key + store) so the values remain accessible via object ID in explorers and wallets. Dynamic fields give you flexibility similar to maps but with heterogeneous types and runtime keys.([Sui Documentation][1])

Tables and Bags are higher‑level collection abstractions built on dynamic fields, designed to prevent accidentally orphaning attached fields. Bags track entry count and prevent deletion when non‑empty; Tables enforce homogeneous key/value types. They provide safe collection semantics on top of dynamic fields.([Sui Documentation][2])

You can still find details in Sui’s documentation under References → Framework → sui::dynamic_field and dynamic_object_field modules, where operations like add, exists, borrow, and remove are fully defined.([Sui Documentation][3])

Unfortunately, those sections aren't currently surfaced via the search on docs.sui.io, likely due to navigation updates—but the features themselves remain active. For more practical guides, check the Move Book and Sui Move Intro Course which explain dynamic fields and how Tables/Bags use them.([intro.sui-book.com][4])

0
Comments
.

Do you know the answer?

Please log in and share it.