
Spotfire document properties
Document properties are key to the use of user inputs and other controls. As we'll see shortly, you can create new document properties in the course of creating controls, but you can also access all document properties directly, creating new ones and editing existing ones through the main document properties dialog.
A document property is "global" to the Spotfire document. In Spotfire nomenclature, the document is the currently open analysis file. A document property can be thought of as a value that is stored in the document. It can be used to control or configure various aspects of the analysis.
You'll find document properties under the File menu options. Select Document Properties and then the Properties tab:

Don't worry about the Script... button for now. Scripting is covered in Chapter 11, Scripting, Advanced Analytics, and Extensions. Stick to the New... and Edit... buttons for now. When creating a new property, you need to enter the following details:
- Property name: You must give the property a unique name with no spaces. You cannot change this once the property has been created, but you can delete the property and start again.
- Data type: You must choose a data type from the drop-down list. You cannot change this once the property has been created.
- Description: This is optional and only required for information purposes. You can change it later.
- Value: This is optional for strings, but you'll need to enter some initial value for numbers, dates/times and Booleans. The value of a document property can be changed as often as you like after it has been created.
Once a document property exists, you can use it as the basis for a property control or reference it directly in a custom expression. A dollar sign and braces are used when referencing a document property, for example, ${ExampleDocumentProperty}. This is very useful functionality, as we are about to see.
There are also a couple of predefined document properties. They are called MaxMissingTimeParts and FiscalYearOffset.
MaxMissingTimeParts allows you to specify the maximum number of missing time parts that should be allowed to be replaced using the Compensate for missing values setting, which is available on the Appearance property page of some visualizations.
FiscalYearOffset specifies the number of months from the start of the calendar year to the start of the fiscal year. For instance, a value of -1 specifies that the fiscal year starts in December of the previous calendar year, whereas a value of 2 specifies that it starts in March of the current calendar year.