# Actions, Expressions, and Rules

In many places, Tinderbox allows you to change what information Tinderbox displays or what actions Tinderbox performs on notes that you have created or moved. These symbolic actions and expressions can provide great flexibility and can save you lots of time. For example:

- A container that holds a “reading list” can know that notes added to the list are likely to be books or articles, and can automatically set the size, appearance, and prototype of new notes.
- A container that holds a set of “chapters” for your book can display the current total word-count for all notes inside it.
- An agent that contains “urgent tasks” can automatically change their color in order to draw your attention.

An expression is simply something that has a value. For example, the expression `0.05*$Price` might calculate the sales tax on an item based on its price.

An action describes a change made on one or more notes. For example, the action`$Color(California)="red"` sets the color of the note named “California” to “red”.

Actions may be performed at a variety of times.

- An OnAdd action is performed when a note is added to a container, is discovered by an agent, or is placed atop an adornment, and affects the note being added.
- A Rule is performed at frequent intervals, and affects the note that possesses the rule.
- An Edict is performed after a document is opened, and at infrequent intervals while the document remains open.