Studio

Global Document Reference

Schema type reference documentation for Global Document References.

Global document references expand the concept of the reference type to support referencing documents in other datasets.

Global document references are limited to Media Library

Like standard references, global document references can be either strong (default) or weak. A strong reference will ensure that the document it points to actually exists and will not allow the deletion of a document that any other document refers to. A weak reference allows pointing to documents that may not exist (yet) or have been deleted.

Properties

  • Requiredtypestring

    Value must be set to globalDocumentReference.

  • Requirednamestring

    Required. The field name. This will be the key in the data record.

  • RequiredresourceTypestring

    The resource type containing the connected documents. At the moment, Media Library can reference the dataset resource type.

  • RequiredresourceIdstring

    The ID of the target resource. A resourceId is made up of the projectId and the dataset name, connected by a .. For example:

    • projectId.datasetName.
    • w3dbef.production
    • wm2efj.staging
  • Requiredtoarray

    Must contain an array naming all the types which may be referenced. For example: [{type: 'person'}]. See more examples below.

  • weakboolean

    If set to true the reference will be made weak. This allows references to point at documents that may or may not exist, such as a document that has not yet been published or a document that has been deleted (or indeed an entirely imagined document).

  • titlestring

    Human-readable label for the field.

  • optionsobject

    Further configure the schema type. See details in the "options" section below.

Options

  • filterstring

    A GROQ filter string (the contents between the square brackets), such as language == "en-US".

  • filterParamsobject

    Object of parameters for the GROQ-filter specified in filter.

Example

Was this page helpful?

OSZAR »