Previous: Scope of column definitions, Up: Defining columns


7.5.1.2 Column attributes

A column definition sets the attributes of a column. The general definition looks like this:

      %[width]property[(title)][{summary-type}]

Except for the percent sign and the property name, all items are optional. The individual parts have the following meaning:

     width           An integer specifying the width of the column in characters.
                     If omitted, the width will be determined automatically.
     property        The property that should be edited in this column.
     (title)         The header text for the column. If omitted, the
                     property name is used.
     {summary-type}  The summary type.  If specified, the column values for
                     parent nodes are computed from the children.
                     Supported summary types are:
                     {+}       Sum numbers in this column.
                     {+;%.1f}  Like ‘+’, but format result with ‘%.1f’.
                     {$}       Currency, short for ‘+;%.2f’.
                     {:}       Sum times, HH:MM:SS, plain numbers are hours.
                     {X}       Checkbox status, [X] if all children are [X].
                     {X/}      Checkbox status, [n/m].
                     {X%}      Checkbox status, [n%].

Here is an example for a complete columns definition, along with allowed values.

     :COLUMNS:  %20ITEM %9Approved(Approved?){X} %Owner %11Status \1
                        %10Time_Estimate{:} %CLOCKSUM
     :Owner_ALL:    Tammy Mark Karl Lisa Don
     :Status_ALL:   "In progress" "Not started yet" "Finished" ""
     :Approved_ALL: "[ ]" "[X]"

The first column, ‘%25ITEM’, means the first 25 characters of the item itself, i.e. of the headline. You probably always should start the column definition with the ‘ITEM’ specifier. The other specifiers create columns ‘Owner’ with a list of names as allowed values, for ‘Status’ with four different possible values, and for a checkbox field ‘Approved’. When no width is given after the ‘%’ character, the column will be exactly as wide as it needs to be in order to fully display all values. The ‘Approved’ column does have a modified title (‘Approved?’, with a question mark). Summaries will be created for the ‘Time_Estimate’ column by adding time duration expressions like HH:MM, and for the ‘Approved’ column, by providing an ‘[X]’ status if all children have been checked. The ‘CLOCKSUM’ column is special, it lists the sum of CLOCK intervals in the subtree.


Footnotes

[1] Please note that the COLUMNS definition must be on a single line - it is wrapped here only because of formatting constraints.