IR Framework

PartitionFilter.QueryToFilter Property

Gets or sets the QueryToFilter property of the PartitionFilter object.
object.QueryToFilter ([value])

Arguments

object
Required. Always the name of a PartitionFilter object.


value
Optional. The Query object to filter by partition.



Return Value

The PartitionFilter.QueryToFilter property returns the Query object to which the partition filter is to be applied.



Remarks

When attempting to set the property value, it is good to check the return value to ensure that the value was set.

The following example illustrates the use of the QueryToFilter property.

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