Skip to content
SurfaceDocs
FRGet started
DocsWork with Surface

Search and navigation

Find content and understand why it appears.

Search in the right context

Search finds authorized objects and their context. Results should identify the object, Workspace and relevant content before opening. Collection search controls operate within the scope declared by its Query.

Control Expected value Effect
Search User-entered text Restrict objects within scope
Filter Admitted Field or parameter value Narrow the collection
Sort Authorized column and direction Order results
Pagination Available page or continuation Reach further results

Example

In Quotes, search North Studio and filter For approval. Results retain client links and open individual proposals. In the Client selector of a new quote, search the same name: you are selecting a target identity rather than a quote.

Empty or incomplete results

Check current Workspace, filters and permissions before concluding an object does not exist. Another view must not circumvent access restrictions. Incomplete loading must not appear as an empty collection.

See Queries to define search for your app. To search this documentation, use the header button or Ctrl/⌘ K.

Applied examples : Search and filter quotes

The Status control supplies a declared parameter; the Query retains its bounds and permissions.

Configuration

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

{
  "contract": "WorkspaceQueryControls@1",
  "filters": [
    {
      "parameterKey": "status",
      "label": "Status",
      "input": "choice",
      "options": [
        {
          "value": "draft",
          "label": "Draft"
        },
        {
          "value": "approved",
          "label": "Approved"
        }
      ]
    }
  ],
  "sort": null
}

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
    },
    {
      "key": "status",
      "type": "text",
      "required": false
    }
  ],
  "predicates": [
    {
      "fieldKey": "status",
      "operator": "eq",
      "parameterKey": "status",
      "value": null
    }
  ],
  "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
Search and navigationSearch and filter quotes
Clients
Client : North StudioStatus: All ⌄Search…
NumberStatusAmountOpen
S-1042Draft12 500↗
S-1041Approved8 200↗
S-1040Sent4 750↗
Client Query resultsNext page →
Search for a concept, field or action.Esc