The Data tab shows the objects in your space by Tag: your pages, tasks, and everything you tagged. The header shows how many objects the tag has and whether it has a schema; click that to open its schema. For the selected tag it has two views: Objects, where a query editor narrows, sorts and groups the objects without you having to know the query syntax, and Schema, where you look at and edit the tag's attributes.
${widgets.commandButton("Workbench: Data")} opens this tab in the Workbench, and ${widgets.commandButton("Workbench: Schema")} opens it on Schema.
page and task unless you change them. Hover a tag and click its pin to pin or unpin it. Pins are kept in the workbench.pinnedTags option of your ^Library/Config, so everyone using the space sees the same ones.item, link, header, …), collapsed until you open it.Tags from data blocks carry a small data label. Drag the list's right edge to make it wider; double-click the edge to reset it. Typing in the filter narrows every section; Enter picks the first match. Each tag shows its icon: a tag's icon, or else the icon of its pageDecoration (see API/tag).
The Objects view has three parts:
page and task, tagged narrows them to one of your tags, and Open #tag jumps to that tag.count or avg, including your own aggregates.templates.* (such as tasks with their checkbox), or a Custom template… you write with the attributes as ${name}.Changing the tag, or a change that leaves a filter or column without its attribute, offers to undo it.
The bar at the bottom shows the query (at least part of it).
${query[[…]]} in the page you’re editing, or where you typed /Query…. For a query you opened from a page, it’s Update page, which replaces that query, and keeps doing so as you change it further.To change a ${query[[…]]} already on a page, choose Edit in query builder from its widget’s menu, or put the cursor in it and run ${widgets.commandButton("Workbench: Edit Query")}. This is best effort: not every handwritten query can be represented by the visual builder. Editing and inserting queries requires a writable page. For a complete exercise in your own space, follow Guide/Add Structure and Query.
The Schema view lists the tag's attributes: the ones its schema declares, and the ones found by looking at up to 500 of its objects. For each it shows:
string, number, integer, boolean, array, object, null), a format such as date, allowed values (enum), a reference to another tag (ref), or a list of tags or @names (tags, identities). allow empty also accepts the attribute left empty, such as due: with nothing after it (a null value). That's separate from Required, which says whether the attribute must be there at all. Rules the editor can't show as simple controls (an anyOf of different types, say) offer Edit as Lua, also in every row's ⋯ menu: the rule as a Lua table or schema.* helpers, read back without running it.#book page has name because it's a page), declared in a definition elsewhere, local to your changes here, or inferred from the objects.Edit any of them in place, add attributes with Add attribute, and remove or reset them from a row's ⋯ menu, then click Save and apply (or press Mod-s). Changes stay pending, also when you switch tags or close the Workbench, until you save or discard them; the tab shows a • meanwhile. Copy as tag.define copies the schema as Lua, and the icon button picks the tag's icon (or No icon). For a schema defined elsewhere, the toolbar links to the page that defines it.
For a tag without a schema, tick the inferred attributes to keep and click Create schema. Nothing is required until you say so.
Renaming or removing an attribute changes only the schema, never your pages: an attribute you removed shows up again as inferred while objects still have it.
The Data tab saves to its own block in your ^Library/Config, marked -- managed-by: workbench-schemas, next to the block the Configuration tab keeps. It's ordinary Space Lua you can read and edit:
tag.define.page or to a library's tag, are kept as separate config.set and tag.setRequired calls. The original definition is left alone, so later changes to it still take effect.The block runs after the built-in tags and your other scripts (-- priority: -10). When a script that runs even later replaces a schema, saving says which of your changes it overrides.