Filters attributes

Each Command node can have one FILTERS node as a child. The FILTERS node has one or more Filter nodes as children. Filters apply selection criteria to the records that are displayed by a command. Each Filter node has these attributes:

Attribute Description
key Property of the parent object on which the Map Drawer will filter records.

For example, the Submit a Service Request Map Drawer includes an Open Work Orders command with a filter that only shows work orders that aren’t completed. This filter uses the IsCompleted property of the WorkOrder object (specified in the querymoniker attribute of the parent command), and only shows work orders where the value of this property is False. This attribute only applies to compproperty filters.

type Type of filter. Can be one of these values:
  • compproperty: The filter is based on the property specified in the key attribute. The Map Drawer will only show records where the value of this property matches the value attribute.
  • sql: The filter is based on a WHERE statement in SQL.
value For compproperty filters, this attribute specifies the value of the property on which the Map Drawer will filter records. For sql filters, this is the SQL WHERE statement. The “WHERE” is assumed, so the SQL statement shouldn’t include it.

For both types of filters, the value can use parameters that are defined in the PARAMS node. For a compproperty filter, you specify the name of the parameter that will supply the value for the filter. For sql filters, you can use parameters in your SQL statements. To use a parameter, specify the parameter name surrounded by square brackets, such as [PARAM1]. If the parameter represents a date/time or text property, enclose the name in single quotes, such as ‘[PARAM2]’.