Skip to content
SurfaceDocs
FRGet started
DocsModel reference

workspaceRecordQueryBinding

Properties, variants, types and bounds for workspaceRecordQueryBinding.

This reference describes the full structure of workspaceRecordQueryBinding. Paths include nested objects, list items and conditional branches. A branch selected by kind, contract or mode only admits its own properties.

Structure and values

Field Options / expected values Description
key string; min length 1; max length 120; /^[a-z][a-z0-9-]*$/u Required. Stable semantic identifier used by references; changing it changes identity.
queryKey string; min length 1; max length 120; /^[a-z][a-z0-9-]*$/u Required. Reference to a declared Query; scope and authorization remain enforced by the data engine.
parameters Record<string; min length 1; max length 120; /^[a-z][a-z0-9-]*$/u OR string; min length 1; max length 120; /^[a-zA-Z][a-zA-Z0-9]*$/u, closed object OR closed object OR closed object>; semantic validation Required. Named operation or Query parameters and their associated values.
parameters{key}.[kind=entity-id].kind "entity-id" Required. Selects the variant and the properties admitted in this branch.
parameters{key}.[kind=entity-id].definitionPath string; min length 1; max length 600; /^workspace\/[a-z0-9-]+(?:\/surface\/[a-z0-9-]+)*$/u Required. Exact path of a definition in the Model; this is not a record instance ID.
parameters{key}.[kind=field].kind "field" Required. Selects the variant and the properties admitted in this branch.
parameters{key}.[kind=field].field closed object Required. Defines field for this object. Observe the type, variants and bounds in the Options column.
parameters{key}.[kind=field].field.definitionPath string; min length 1; max length 600; /^workspace\/[a-z0-9-]+(?:\/surface\/[a-z0-9-]+)*$/u Required. Exact path of a definition in the Model; this is not a record instance ID.
parameters{key}.[kind=field].field.fieldKey string; min length 1; max length 120; /^[a-zA-Z][a-zA-Z0-9]*$/u Required. Key of a Field declared on the referenced Surface definition.
parameters{key}.[kind=literal].kind "literal" Required. Selects the variant and the properties admitted in this branch.
parameters{key}.[kind=literal].value string; max length 4000 OR number OR true | false OR null Required. Effective value interpreted according to the enclosing type and discriminant.

Reading the contract

A path ending in [] describes each list item; {key} describes each dictionary value. The ↻ marker refers to the same recursive expression. Closed objects reject additional properties. Semantic validation denotes an additional check: matching a type does not make a reference, permission or transition valid. References must resolve in the Model and the current user context.

An older variant cannot accept properties belonging to a newer variant. The compiler checks the version and consistency of the complete Model.

Structural example

This fragment passes the schema for this section. Its business references must be defined in the enclosing Model.

{
  "key": "character-chapters",
  "queryKey": "character-chapters",
  "parameters": {
    "characterId": {
      "kind": "entity-id",
      "definitionPath": "workspace/reference/surface/character"
    }
  }
}

Complete Model index · Build a Model

Applied examples : Quotes for the current client

The Query declares clientId; the binding supplies the identity of the open record.

Configuration

Contract object workspaceRecordQueryBinding. Properties and accepted values.

{
  "key": "client-quotes",
  "queryKey": "client-quotes",
  "parameters": {
    "clientId": {
      "kind": "entity-id",
      "definitionPath": "workspace/clients/surface/client"
    }
  }
}

Variation and connection

Fragment placed in queries[]. Properties and accepted values.

{
  "contract": "WorkspaceQuery@1",
  "key": "client-quotes",
  "label": "Client quotes",
  "spaceKeys": [
    "quotes"
  ],
  "definitionPaths": [
    "workspace/quotes/surface/quote"
  ],
  "parameters": [
    {
      "key": "clientId",
      "type": "node-id",
      "required": true
    }
  ],
  "predicates": [],
  "relations": [
    {
      "linkTypePath": "application/client",
      "direction": "outgoing",
      "parameterKey": "clientId",
      "distinct": true
    }
  ],
  "orderBy": [
    {
      "fieldKey": "updatedAt",
      "direction": "descending"
    }
  ],
  "aggregate": "none",
  "pageSize": 25,
  "maximumDepth": 1
}

UI layout example

The illustrative layout below places this configuration in the Clients/Quotes app. Insert each fragment at the stated location, with Field, Query and Action references matching the Model declarations.

  1. Number
  2. Status
  3. Amount
  4. Last updated
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
workspaceRecordQueryBindingworkspaceRecordQueryBinding
Clients
MODEL CONTEXTNorth StudioDeclarative configuration
key
client-quotes
queryKey
client-quotes
parameters
Declared object

Values above follow the configuration fragment; references resolve in the complete Model.

Search for a concept, field or action.Esc