XML variables

Multiple values (for example, the captions and unique names of elements) can be saved in a single global variable. The definition of the variable and its properties is saved as XML. The XML is generated and maintained by using the SETPROPERTY function in conjunction with an action, such as a Set parameters action.

An XML variable can be used, for example, to hold the values of the slice dimensions in a report. By linking the XML variable to a Tuple report parameter the slice dimensions can be used for widget communication if the report is displayed in a dashboard.

In the Accessories pane you can open a global variable for which properties have been created and see the XML definition.

Example of SETPROPERTY

This statement:
=SETPROPERTY(GlobalVariables.gvSetProperty,"[Product]","Unique",
"[Product].[All Tires].[Car Tires All Season]")
	 
creates this XML statement:
<Table><Row name="[product]"><Property name="unique" 
value="[Product].[All Tires].[Car Tires All Season]"/></Row></Table>
In this example, the Product dimension is the key and is used as the row name. The name of the property is "Unique" and the value is the unique name of the All Season Tires element.

You can use SETPROPERTY to set multiple properties, values, and keys.