官术网_书友最值得收藏!

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.

Important note: Document properties can only be configured using Analyst clients.

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 11Scripting, 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.

Document properties cannot have spaces or special characters such as underscores in their names. When naming properties, it's good practice to use what's known as UpperCamelCase, concatenating the words you want to use and starting each with a capital letter. Try to cultivate a logical and consistent approach to naming properties such that the name is self-explanatory.

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.

主站蜘蛛池模板: 临安市| 阳新县| 桃园市| 芒康县| 广汉市| 青铜峡市| 高雄县| 台南县| 桃源县| 庄浪县| 前郭尔| 拉孜县| 通渭县| 遵化市| 肇州县| 瓮安县| 五常市| 德惠市| 安新县| 栾城县| 抚顺市| 新密市| 离岛区| 阿合奇县| 石景山区| 星座| 梁平县| 桓仁| 岚皋县| 西林县| 习水县| 宝丰县| 武穴市| 石台县| 五华县| 茂名市| 澎湖县| 邢台县| 大足县| 文成县| 即墨市|