Modify a filter
The format of the <method>
element
for modifying a filter is:
<method methodName="filter.modify">
Use
this method to modify the characteristics of an existing filter. The <method>
element
contains one or more <filter>
elements each
of which defines the new characteristics of an existing filter. Include
only attributes of the <filter>
that correspond
to the characteristics you want to change. When you omit an attribute
the corresponding characteristic is unchanged. For more information,
see <filter>.
For a dependent filter, the <filter>
element
contains one or more instances of the <dependentlist>
element.
For more information, see <dependentlist>.
Example
This example modifies the filter
named exampleFilter1
and makes the following changes
to the filter's characteristics:
- The SQL WHERE clause becomes lastOccurrence >= getdate-1800
- The metric label becomes MyMetric:
In addition, the example adds the following characteristics to the filter:
- The view is a global view
- The metric value is the average of the
SubDivision
field
<methodCall>
<method methodName="filter.modifyFilter">
<filter name="exampleFilter1"
sql="LastOccurrence >= getdate -1800"
metriclabel="MyMetric:"
metricshow="Average"
metricof="SubDivision"
view = "advanced"
viewtype="global"
type="global"
datasource="NCOMS"
/>
</method>
</methodCall>