Question: What ius the difference between a User and System field?

If you create a new tiddler and edit it, you get to enter or select new fields for the current tiddler.

Existing fieldnames in the new field dropdown are organised into user and system fields.

Can anyone tell me how tiddlywiki seperates these two field categories, user and system?

Thanks in Advance

The “new field dropdown” list contents are populated in $:/core/ui/EditTemplate/fields.

If you search that tiddler’s source for <<qualify "$:/state/popup/field-dropdown">>, you will see that the code that follows it actually outputs the list contents.

The “user” field items are produced by this $list filter:

<$list filter="[!is[shadow]!is[system]fields[]search:title<newFieldName>sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type"  variable="currentField">

and the “system” field items are produced by this $list filter:

<$list filter="[fields[]search:title<newFieldName>sort[]] -[!is[shadow]!is[system]fields[]]" variable="currentField">

Thus, user fields are:

  • all fields that are defined in “regular” (non-shadow, non-system) tiddlers, excluding created, creator, draft.of, draft.title, modified, modifier, tags, text, title, and type.

and system fields are:

  • all fields that are defined in any tiddlers, excluding any fields defined in regular (non-shadow, non-system) tiddlers.
2 Likes

Thanks Eric. That is helpful :sunglasses:

You may be interested in @pmario 's Field Visibility — toggle field visibility in edit mode

2 Likes