AttributeFilter Command

Use the AttributeFilter command in a Logic Template to filter out records that have all, some or no attributes set within a specified attribute field. The attributes to be tested are identified within an attribute selection mask by using the att HTML variable.

An attribute list consists of anywhere from 1 to 1024 attributes. Each attribute has only two possible values, 0 or 1. If the specified attribute has a value of 1, the attribute is set. If the attribute has a value of 0, the attribute is not set.

To handle uninitialized data, an attribute array with no attributes set ( ie: all attributes equal to 0 ) can be treated as a special case by setting the process flag to drop within the command. Setting the process flag to drop indicates records with attribute arrays with no attributes set are to be discarded. Setting the flag to keep indicates records with attribute arrays with no attributes set are to be passed through regardless of whether or not they match the filter criteria. Not setting the flag indicates that records with attribute arrays with no attributes set are not to be given any special consideration.

To test against attributes selected from an HTML multi-select drop-box, build an attribute selection mask by passing the name of the HTML variable corresponding to the drop-box to the AttributeFitler command. Then use the attribute selection mask as input to the filter request.

To execute an Attribute filter request, use the AttributeFilter command with three or four arguments:

AttributeFilter( fc, list, att ); or AttributeFilter( fc, list, att, flag );

AttributeFilter Arguments

Argument

Description

fc

The funcition code or type of filter to be requested.

list

The name of the data field, within each record containing the attribute list to be tested.

att

The HTML variable representing the attribute selection mask -- the list of attributes to be tested.

flag

Indicate ( drop or keep ) special processing for records with no attributes set in all of list.

Access the AttributeFilter Dialog Box by selecting Attributes->Attribute Filter menu item under the Filtering category of the Logic Template editor command menu.

Examples

Command

Description

AttributeFilter( MATCH_ALL, Class, AttributeMask );

Pass records with all attributes set, in the attribute list data field "Class", matching those attributes identified by the attribute selection mask contained in the HTML variable "AttributeMask".

AttributeFilter( MATCH_ALL, Class, AttributeMask, keep );

Pass records with no attributes set in the attribute list data field "Class", or with all attributes set, in the attribute list data field "Class" matching those attributes identified by the attribute selection mask contained in the HTML variable "AttributeMask".

AttributeFilter( REJECT_TOTAL, Class, AttributeMask );

Reject records with all attributes set, in the attribute list data field "Class", matching those attributes identified by the attribute selection mask contained in the HTML variable "AttributeMask".

AttributeFilter( REJECT_TOTAL, Class, AttributeMask, drop );

Reject records with no attributes set in the attribute list data field "Class", or with all attributes set, in the attribute list data field "Class" matching those attributes identified by the attribute selection mask contained in the HTML variable "AttributeMask".

AttributeFilter( MATCH_SOME, Class, AttributeMask );

Pass records with at least one attribute set, in the attribute list data field "Class", which is identified by the attribute selection mask contained in the HTML variable "AttributeMask".

AttributeFilter( MATCH_SOME, Class, AttributeMask, keep );

Pass records with no attributes set in the attribute list data field "Class", or with at least one attribute set, in the attribute list data field "Class", which is identified by the attribute selection mask contained in the HTML variable "AttributeMask".

AttributeFilter( MATCH_NONE, Class, AttributeMask );

Reject records with at least one attribute set, in the attribute list data field "Class", which is identified by the attribute selection mask contained in the HTML variable "AttributeMask"..

AttributeFilter( MATCH_NONE, Class, AttributeMask, keep );

Reject records with no attributes set in the attribute list data field "Class", or with at least one attribute, set in the attribute list data field "Class", which is identified by the attribute selection mask contained in the HTML variable "AttributeMask"..