# &appname; Details

## Field Types

Each collection may have an unlimited number of fields. &appname; supports eleven types of fields, which allow for a range of different data.

### Simple Text

The most basic field type is called Simple Text. No restrictions are placed on the field values, and the data entry widget is the standard line edit. This type is appropriate for fields which aren't expected to have long values, such as the author or the genre.

### Number

The Number type is identical to the Simple Text, except that the data is restricted to being numerical. Entries will be sorted numerically in the column view if a Number field column is clicked. The standard line edit, with small arrow buttons for increasing or decreasing the value, is used for data entry. No formatting is ever applied.

### &URL;

The &URL; type allows for links to other documents, using the standard &kde; file type associations for opening the linked documents. No validation is done on the actual value of a &URL; field, but non-valid links are not opened. The data entry is a line edit with a button for opening the standard File-Open dialog, but any &URL; may be used. Relative &URL;s are interpreted relative to the location of the data file, once it has been saved.

In the Entry Editor, the label becomes the link, while in the Entry View, an actual hyperlink is used. This field type is convenient for linking to PDF files of bibliographic entries, or to movie reviews, for example. No formatting is ever applied.

Relative &URL;s may also be used. They are interpreted relative to the location of the &appname; data file. In the Entry Editor, the line edit provides auto-completion for local file locations. If you want the &URL; from the &kde; File Selector Dialog Box to be interpreted relative to the document location, then a property for the &URL; field should be set to relative : true.

### Paragraph

For longer text fields, the Paragraph type offers a larger text edit area, and is always in its own category. A Paragraph field may not have multiple values, nor is it automatically formatted. It cannot be used for grouping. Abstracts, plot summaries, or reviews should be entered using this field type.

Line feeds are replaced by an HTML break to ensure consistent formatting. To disable this replacement, add a property for the field with a value of replace-line-feeds : false. Spell-checking can be disabling by setting a property with a value of spellcheck : false.

### Choice

When a field should be limited to a few preset values, a Choice type is used. The acceptable values are presented in a drop down box for selection. Multiple values can be allowed. Fields such as bibliography type or personal rating are Choice-type fields.

Semi-colons should be used to separated the allowed values.

### Checkbox

For fields which take a yes or no value, the Checkbox type is available. By default, the field is toggled off. Checkbox fields are not formatted and are limited to single values. Internally, the field values are carried as `true` or `false`. Some examples are gift or loaned fields.

### Date

A Date field can include a day, month, and year. The date is shown in the standard format of YYYY-MM-DD, which allows for easy sorting. The standard &kde; Date Selector may be used to choose the date with the mouse, or it may be entered directly. The field is not required to have non-empty values for the year, month, and day; only the year may be entered, for example. Multiple values are not allowed.

### Table

Table fields hold a one or more columns of values. In the Entry Editor, the field is presented using a spreadsheet-like view, with numbered rows. When the last row is selected, an additional row is then added. Auto-completion is not available. This field is useful for a list of chapters in a book, scenes in a movie, or songs in an album. Table fields are always a category by themselves.

The number of columns, up to a maximum of ten, is defined by adding a property to the field definition with the name columns. The columns may be labeled by right-clicking on the header, or by setting a field property named column1, etc.

When using the Entry Editor for Table fields, rows may be rearranged by dragging the mouse while holding the &Ctrl; button. A popup menu is also available by right-clicking on the table, which allows rows to be inserted or removed.

### Image

Image fields hold an image, of any format supported by &kde;. Some of the typical ones include PNG or JPEG. The image can be saved inside the &appname; data file itself or in the application data directory. The standard &kde; File Selector is used, so you can use a &URL; or just a file available locally. Images can also be dragged from a file manager or browser.

### Rating

Rating fields show a number of stars to represent a numerical rating for an entry. By default, the rating is a maximum of five. The minimum and maximum may be changed by setting properties in the field definition in the Collection Fields Dialog, named minimum and maximum, respectively.

### Derived Value Fields

Fields with derived values are a special case. The field type corresponds to the typical type of value contained in the field, but the value of the field is constructed from other fields using a format string in the field description. For example, if the field has a value template of `%{title} %{year}`, then the value of that field will be the title, followed by the year. This field type is used primarily for the title field in the coin, stamp, trading card, and wine collections. Either the internal field name or the field title may be used in the description for formatting.

To select only a single value for a field with multiple values, add a position index to the template, such as `%{author:1}` for the first author. The position may be negative, counting from the end, so `%{author:-1}` would be the last author. Upper and lower-case values may be used by setting template flags, such as `%{author:1/l}` for lower-case first author and `%{author:1/u}` for upper-case.

## Collection Types

&appname; supports twelve specific collection types by default: books, bibliographic entries, comic books, videos, music, video games, trading cards, coins, stamps, wines, board games, and file catalogs. In addition, an empty generic collection template is available for any other collectibles. The default collections are only meant to include a general set of fields. You should add, modify, or delete them to fit your needs. The only requirement is that a collection should always have a Title field, so that the Group View works correctly. For some collection types, that is just a derived value field combining two or more of the others.

In general, there's no functional difference between the collection types. You could create a custom collection for your books just as easily as using the default book collection. But &appname; chooses icons based on collection type, and there may be some specialized functionality that is unique to a certain collection, so if you can, you should use the defaults. So, if you want to create a wine collection, but don't like any of the default fields, go ahead and create a default wine collection, then delete all the defaults. That way, &appname; still knows that it's a wine collection.

By default, all the collection types include an ID field, which shows the ID number of the entry. In addition, except for the file catalog, each collection includes fields showing the date that the entry was created in the collection and the last time that it was modified.

### Book Collections

Book collections have 27 default fields: Title, Subtitle, Author, Binding, Purchase Date, Purchase Price, Publisher, Edition, Copyright Year, Publication Year, ISBN#, LCCN#, Pages, Language, Genre, Keywords, Series, Series Number, Condition, Signed, Read, Gift, Loaned, Rating, Front Cover, Plot Summary, and Comments.

The ISBN# field is special, since ISBN numbers are automatically formatted and the check-digit is calculated. &appname; recognizes the ISBN field if its internal field name is isbn. If you have deleted it, or need to add it to another type of collection, create the field with the title as ISBN and apply the change, then you can return and modify the title as you want. &appname; creates the internal name based on the initial title, but never changes it if the title is later updated.

### Bibliographies

Bibliographies have 25 default fields: Title, Entry Type, Author, Bibtex Key, Book Title, Editor, Organization, Publisher, ISBN#, Address, Edition, Pages, Year, Journal, Month, Number, How Published, Chapter, Series, Series Number, Volume, Cross-Reference, Keywords, Abstract, and Notes.

Although bibliographic collections are not specifically linked to bibtex, the default set of fields is taken from a typical set of bibtex fields. When exporting to bibtex, a property called bibtex is used for each field to define the corresponding bibtex field. If you add an additional field to a bibliography and want to export it to bibtex, be sure to set the bibtex property.

&appname; does have some specialized functions for bibliographies. Bibtex string macros can be added, modified, or deleted from within &appname; and the bibtex export gives you the option of expanding the macros. Bibtex citations can be pushed to an external application such as LyX or Kile using the so-called lyxpipe.

Book collections can be converted to bibliographies. Default bibtex fields are added, and the bibtex properties are set. This functionality exists primarily to convert old collections, before the bibliography type was separated from the book collection type.

### Comic Book Collections

Comic book collections have 23 default fields: Title, Subtitle, Writer, Artist, Series, Issues, Publisher, Edition, Publication Year, Pages, Country, Language, Genre, Keywords, Condition, Purchase Date, Purchase Price, Signed, Gift, Loaned, Front Cover, Plot Summary, and Comments.

### Video Collections

Video collections have 30 default fields: Title, Medium, Production Year, Certification, Genre, Region, Nationality, Format, Cast, Director, Producer, Writer, Composer, Studio, Language Tracks, Subtitle Languages, Audio Tracks, Running Time, Aspect Ratio, Widescreen, Color Mode, Director's Cut, Plot Summary, Personal Rating, Purchase Date, Purchase Price, Gift, Loaned, Cover, and Comments.

The Cast field is a table with two columns, and the name of the actor is intended to be in the first column, with their role in the second. The Running Time is meant to be in minutes, though you can change that, of course.

### Music Collections

Music collections have 15 default fields: Title, Medium, Artist, Label, Year, Genre, Tracks, Rating, Purchase Date, Purchase Price, Gift, Loaned, Keywords, Cover, and Comments.

### Video Game Collections

Video game collections have 16 default fields: Title, Platform, Genre, Release Year, Publisher, Developer, ESRB Rating, Description, Personal Rating, Completed, Purchase Date, Purchase Price, Gift, Loaned, Cover, and Comments.

### Card Collections

Trading card collections have 17 default fields: Title, Player, Team, Brand, Card Number, Year, Series, Card Type, Purchase Date, Purchase Price, Location, Gift, Keywords, Quantity, Front Image, Back Image, and Comments.

### Coin Collections

Coin collections have 16 default fields: Title, Type, Denomination, Year, Mint Mark, Country, Coin Set, Grade, Grading Service, Purchase Date, Purchase Price, Location, Gift, Obverse, Reverse, and Comments.

### Stamp Collections

Stamp collections have 18 default fields: Title, Description, Denomination, Country, Issue Year, Color, Scott#, Grade, Cancelled, Hinged, Centering, Gummed, Purchase Date, Purchase Price, Location, Gift, Image, and Comments.

### Wine Collections

Wine collections have 15 default fields. Title, Producer, Appellation, Varietal, Type, Country, Purchase Date, Purchase Price, Location, Quantity, Drink By, Rating, Gift, Label Image, and Comments.

### Board Game Collections

Board game collections have 17 default fields. Title, Genre, Mechanism, Release Year, Publisher, Designer, Number of Players, Playing Time, Minimum Age, Description, Rating, Purchase Date, Purchase Price, Gift, Loaned, Cover, and Comments,

### File Catalogs

File catalogs have 14 default fields. Name, &URL;, Description, Volume, Folder, Mimetype, Size, Permissions, Owner, Group, Created, Modified, Meta Info, and Icon,

### Custom Collections

Custom collections have one default field, the Title. They should be used when the collectible item is not one of the default types.