9.1 What We Mean by Label and Type
A field label is the thing you see identifying a particular field for each Note.
A field type identifies a set of behaviors and representations that will be available for a particular field.
To keep things simple, Notenik will typically infer a field type based on its label. And, in fact, many field types exactly match the labels typically used to invoke a field of that type. So, for example, a field with a label of Link
will typically also have a field type of link
.
Every field within a Collection must have its own unique label. However, you can often have multiple fields with different labels but of the same type.
Both labels and types can be specified within the Collection template file. For example, consider the following line appearing at the top of a Collection’s template file:
Name: <title>
Such a line would be used to specify a field with the label Name
, and of the type Title.
Notenik only supports a limited set of field types, and all fields, no matter how they are labeled, will be assigned one of these predetermined types. The default will be a simple String.
A label matching the desired type is the easiest way to create a field of that type; however, by specifying an explicit type within a Collection’s template file (as in the example above), any type can be assigned to any label.
You can make up your own field labels – you’re not constrained by the default set offered by Notenik. You’re only constrained by a few rules:
- A field label may not consist of more than 48 characters;
- A field label may not contain special characters, other than dashes and underscores.
- A field label may not contain more than six spaces – meaning no more than seven words separated by spaces.
One think to keep in mind, when it comes to field labels and field types, is that Notenik sees these identifiers only through what we might call a lowest common denominator representation. Such a representation is formed by changing all letters to lower case, and removing all spacing and punctuation.
So whether you type a field label, or see it referred to, as Time Stamp
, Timestamp
, time-stamp
or timestamp
, it makes no difference to Notenik: all of these boil down to the same internal representation of timestamp
, and thus all will be treated identically.
Each field label/type is discussed below, grouped into logical collections.