Table of Contents

Metadata Of Something - (advanced ⚠)

you are here (click to zoom) - discover the stack

Metadata is Data which describes or adds information to other data.

When working with things (let's call it the Target or Owner) which have metadata, we talk about the Metadata being Metadata Of the Owner.

In 2sxc many object have Metadata, such as

  1. Apps
  2. Content-Types
  3. Attribute Definitions
  4. Entities

You can always access the Metadata through the .Metadata property.

Tip

When looking at Metadata from the Target object, we call it Metadata Of the Target.

When looking at it from the Metadata-items point of view, they are Metadata-For the Target.

The Metadata Property

You can probably learn a lot by looking at the API docs of MetadataOf but here are the important parts:

  • You can loop through the Metadata property
  • The Metadata-Property will always return at least 1 item, even if no metedata was specified.
  • If no data was specified, the returned item will have an Id of 0 (zero)
  • Additional helpers like GetBestValue let you quickly get a value without going through the items themselves

History

  1. Introduced in 2sxc v2
  2. Continuously improved in 2sxc 7, 8, 10 and 11