Skip to documentation content

Where Datastore Fields Live

Where Datastore Fields Live

A datastore item's fields live on the Datastore or on a partial's fields file, and each placement assumes something about whether items have pages.

A datastore item's fields can live in two places, and each assumes something.
• On the Datastore (its own Fields). Every item has them, whether or not it has a page, and wherever it is shown. A datastore whose items never have pages (CreatePageByDefault false, no URLs) needs its fields here: values defined by a template are saved only for an item that has a page and a template, so a field defined on a partial is not saved for a pageless item.
• On a partial's fields file. The template that reads a FieldID defines it (see Where Custom Fields Belong), and the field is composed onto the form of every item whose page includes that partial. This works well when each item has a page; it assumes it does.
When several datastores render through one partial (one card partial for Equipment, Materials, and Industries), the partial reads fixed FieldIDs, so each datastore must define them. Declaring the shared FieldIDs once and reusing that same set on every datastore avoids drift; redeclaring them by hand per datastore invites a field missing on one, whose cards then render blank. Family-specific copy can differ and live on that family's detail partial.