> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: About Collection Fields ## Article: About Collection Fields ## Article Link: https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/about-collection-fields.md ## Article Content: # About Collection Fields Collection fields define the structure and data types of [collections](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/about-collections.md). They act as the columns in your collection, determining what kind of information each data item can store and how it's organized. You can manage fields using the [Data API](https://dev.wix.com/docs/sdk/backend-modules/data/collections/introduction.md) or through the [CMS](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields). ## Field IDs Every field has a unique field ID that serves as its identifier when you reference it in code. For example, here `title`, `price`, and `available` are field IDs in the `Listings` collection: ```javascript // Insert data using the field IDs title, price, and available const newItem = await items.insert("Listings", { title: "Modern Downtown Apartment", price: 2500, available: true, }); // Query using field IDs const results = await items.query("Listings").eq("available", true).find(); ``` Learn how to [find a field ID](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/find-a-field-id.md). ## Field types The CMS supports various field types to handle different kinds of data. The available field types include: - **Essentials**: Basic data types like text, numbers, dates, and booleans. - **Media**: Types for images, audio, video, and files. - **Time and location**: Types for storing time zones, locations, and addresses. - **JavaScript**: Types for storing objects and arrays. Field types can provide structure and validation but aren't strictly enforced. You can technically store data that doesn't match the field type, though this isn't recommended. ## Reference fields Reference fields create connections between different collections. They store the ID of an item from another collection, allowing you to link related data together. You can use single reference fields to connect to a single item, or multi-reference fields to connect to multiple items from another collection. ## System fields System fields are automatically created in every collection to store essential metadata. - **\_id**: Unique identifier for each item. - **\_createdDate**: Timestamp when the item was first created. - **\_updatedDate**: Timestamp when the item was last modified. - **\_owner**: ID of the visitor or member who created the item. System fields are read-only and managed automatically by the CMS. However, you can explicitly set a unique `_id` of your choice when [inserting](https://dev.wix.com/docs/sdk/backend-modules/data/items/insert.md) or [saving](https://dev.wix.com/docs/sdk/backend-modules/data/items/save.md) new items using the Data API. ## Undefined fields Undefined fields are those that appear in your collection but aren't part of the defined structure. This can happen when [restoring a previous version of a site](https://support.wix.com/en/article/viewing-and-managing-your-site-history) or when adding data using the Data API that doesn't match a defined collection field. Undefined fields allow flexibility when working with evolving data structures, but it's best practice to define all fields properly in your collection. ## See also - [About Collections](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/about-collections.md) - [Find a Field ID](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/find-a-field-id.md) - [About Collection Fields](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/about-collection-fields.md) - [Collection structure](https://support.wix.com/en/article/about-the-structure-of-your-database-collection)