WSDOT Custom Scripting for Hyperion

PartitionFilter.SetPartition Method

Adds a key and item pair to a PartitionFilter object.
object.SetPartition ()

Arguments

object
Required. Always the name of a PartitionFilter object.



Return Value

The PartitionFilter.SetPartition method returns the a String indicating the status of setting the filter.
If SetPartition returns
Not all of the PartitionFilter properties are set. "error"
All properties are set but the filter was not used.
(This is usually because of mutually-exclusive filters.)
"not used"
All properties are set and the filter was used. A comma-delimited list of the values that were used for the filter.


Remarks

The SetPartition method uses the properties of the PartitionFilter object to set the appropriate limit to take advantage of database partitioning.

The following example illustrates the use of the SetPartition method.

try {
	ActiveDocument.pf1 = new ActiveDocument.PartitionFilter();
	Console.Writeln(ActiveDocument.pf1.toString());	//	outputs "[Object][PartitionFilter]" to the Console
	var vTest = ActiveDocument.pf1.QueryToFilter(ActiveDocument.Sections["Q-DataToReport"]);
	if (typeof vTest == "undefined") throw new Error("Invalid Query:  Q-DataToReport");
	vTest = ActiveDocument.pf1.FilterItem(ActiveDocument.pf1.QueryToFilter().Limits["Fiscalbienniumid"]);
	if (typeof vTest == "undefined") throw new Error("Invalid Limit:  Fiscalbienniumid");
	vTest = ActiveDocument.pf1.PartitionValuesResult(ActiveDocument.Sections["q-MyPartitionValues"]);
	if (typeof vTest == "undefined") throw new Error("Invalid Query:  q-MyPartitionValues");
	vTest = ActiveDocument.pf1.PartitionValuesColumn(ActiveDocument.pf1.PartitionValuesResult().Limits["Begin Bien Year"]);
	if (typeof vTest == "undefined") throw new Error("Invalid Limit:  Begin Bien Year");
	
	ActiveDocument.pf1.SetPartition();	//	use the data in the PartitionFilter object to set the limit in QueryToFilter
}
catch (e) {
	Console.Writeln(e.toString());
}


Applies To:

PartitionFilter Object



Requirements