Column

Just as rows describe how your content is oriented horizontally in the outline, Columns describe how it is grouped vertically.

All OmniOutliner documents must have at least one column. The default column created for a new document is the Topic column, which contains content in rich text format by default.

The Topic column is also the only column in the outline that can organize its rows hierarchically; when organization in the Topic column changes, content in additional columns comes along for the ride.

Column Properties

Here are the properties of an instance of the Column class:

editor = document.editors[0] visibleColumns = columns.map(function(column){ if (editor.visibilityOfColumn(column)){return column} })
editor = document.editors[0] visibleTextColumns = columns.map(function(column){ if (editor.visibilityOfColumn(column)){ if (column.type === Column.Type.Text){return column} } })
columnTitles = columns.map(function(column){return column.title})

Column Methods (functions)

Here are the methods used with an instance of the Column class:

Column Array Methods (functions)

Here are the methods used with an array of items of the Column class:

column = columns.byTitle('STATS') if (column == null){throw new Error('No column exists.')}
 

Column.Type Class Properties

The Column.Type class properties are the value for the type property of the Column class:

Column.Type Instance Properties

The Column.Type instance properties are the value for an instance of the type property of the Column class:

 

Adding a Column to an Outline

Here’s are two versions of script that adds a numeric column (named “STATS”) after the outline column. The scripts use the addColumn() method of the Column class. The first version includes a passed-in function that names the created column. The second version does not include a passed-in function and instead titles the column after it has been created.

tree = document.outline editor = document.editors[0] tree.addColumn( Column.Type.Number, editor.afterColumn(tree.outlineColumn), function(column){column.title = 'STATS'} )
omnioutliner:///omnijs-run?script=tree%20%3D%20document%2Eoutline%0Aeditor%20%3D%20document%2Eeditors%5B0%5D%0Atree%2EaddColumn%28%0A%09Column%2EType%2ENumber%2C%0A%09editor%2EafterColumn%28tree%2EoutlineColumn%29%2C%20%0A%09function%28column%29%7Bcolumn%2Etitle%20%3D%20%27STATS%27%7D%0A%29
tree = document.outline editor = document.editors[0] var newCol = tree.addColumn( Column.Type.Number, editor.afterColumn(tree.outlineColumn), null ) newCol.title = 'STATS'
omnioutliner:///omnijs-run?script=tree%20%3D%20document%2Eoutline%0Aeditor%20%3D%20document%2Eeditors%5B0%5D%0Avar%20newCol%20%3D%20tree%2EaddColumn%28%0A%09Column%2EType%2ENumber%2C%0A%09editor%2EafterColumn%28tree%2EoutlineColumn%29%2C%20%0A%09null%0A%29%0AnewCol%2Etitle%20%3D%20%27STATS%27
UNDER CONSTRUCTION

This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.

DISCLAIMER