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

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.

主站蜘蛛池模板: 台山市| 敦煌市| 页游| 乌恰县| 上林县| 梧州市| 安达市| 佛教| 那曲县| 五华县| 云林县| 九龙坡区| 博兴县| 上虞市| 香河县| 治多县| 扶沟县| 普兰县| 东城区| 靖西县| 新源县| 行唐县| 长宁区| 南乐县| 永登县| 法库县| 安乡县| 酒泉市| 秦皇岛市| 准格尔旗| 汨罗市| 阿克苏市| 祁门县| 崇义县| 晴隆县| 芦山县| 南宁市| 上饶县| 铁岭县| 平罗县| 云梦县|