# Creating Templates: Getting Started

Each template is made up of multiple rows. Those rows can optionally be broken into sections. An image of a template:A row is defined by a few basic elements and these elements are combined to create a template. Keep in mind that all of these elements are used in both simple and advanced templates. In simple templates many are automatically created for you while in advanced templates you have complete control over them.

## Variables

The underlying reference of a row. Each row must have a single, unique variable. In a spreadsheet a cell reference (i.e., its variable) is defined as A1, B2, A3, etc.powerOne variables can be as simple as A, B, C or A1, B1, C1. They can also be more memorable. For instance variables in a mileage calculator could be:

- end
- begin
- end_mileage
- mileage1
- totalMiles

Also note that there are three constants: pi, e and i. These cannot be used as variables in either simple or advanced templates.

## Data Types

There are four data types: numbers, tables, dates and lists. (See the Data Types section for details on entering each type.) There is also a fifth type, used to define the separator between sections.**Numbers**: real (decimal) numbers, fractions or feet-inches, numbers are the standard type used in powerOne. Numbers can have default values, you can set the precision of the number (i.e., decimal places), enter and calculate them.**Tables**: a set of real numbers, tables can either be one or two columns with an optional occurrences column. You can set the table's precision, enter and calculate them.**Dates**: a date consisting of month, day and year. Dates can have default values, can be entered or calculated.**Lists**: a list of options. Each list option is tied to a unique number that can be used in an equation. Lists, which expect a default value, can either be entered or calculated.**Separators**: separators indicate breaks in rows, creating sections in the template. These separators can optionally be named.

Each of these five types can be defined in an advanced template. Simple templates assume that all variables are real numbers.

## Labels

A label is a name given to a row. This label can be any combination of characters desired.Examples of labels include:

- Net Present Value
- Interest/Year%
- Tablespoons [tbs]
- Food+Drink
- #Advances

You can use any characters desired, including %, $ and mathematical symbols. Adding ^2 or ^3 will automatically convert to superscript 2 or superscript 3, respectively. Adding % to the end of a label displays the percent symbol after the row's value. See the image above for an example. Finally, you can use HTML character entities.

When creating advanced templates, it is recommended to always surround the label with quotation marks. For multiple word labels, such as Net Present Value, this is required. It would be entered as "Net Present Value". If the label is a single word, however, like #Advances above, then quotes are optional but still recommended.

## Equations

The fourth big piece of the template pie is equations, those formulas that actually define the relationship between rows. Simple templates are derived from an equation. Each element of the template is derived from the equation -- displaying the variable in place of a label -- and each row contains the same equation.In advanced templates you can choose whether any individual row contains an equation or not. In addition, each row can use a completely different equation.

See the Equations section for more details.