LoadMask Command

The LoadMask command in a Logic Template provides a clean interface between an HTML form and one of the filter attribute commands. The LoadMask command is used to create an attribute selection mask. An attribute selection mask is an attribute array used by various filter by attribute commands to select attributes to be tested.

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.

Up to 16 individual attribute selection masks can be created during a single search request. Each attribute selection mask is identified by it own ID ( 1 thru 16 ). Each attribute selection mask can have up to 1024 attributes.

The first time an individual attribute selection mask is updated using a LoadMask command, all the attributes within the attribute array are reset to zero before setting the selected attributes. Each subsequent time the same attribute selection mask is updated by the LoadMask command, the selected attributes are set without resetting any attributes.

To use values within an HTML field to identify attributes to be set within the attribute selection mask, use the LoadMask command with two arguments:

LoadMask( n1, f1 );

LoadMask Arguments

Argument

Description

n1

The ID ( 1 - 16 ) of the attribute selection mask being loaded.

f1

The name of the variable containing a list of attributes to be set. If f1 has been set multiple times within the form, such as with a multi-selection drop box, all values for f1 are concatenated into a single list before processing.

Access the LoadMask Dialog Box by selecting Attributes->Load Mask menu item under the Filtering category of the Logic Template editor command menu.

Examples

Command

Description

LoadMask( 7, AttributeList);

Set attributes identified by the variable AttributeList within the attribute selection mask with ID 7.

AttributeList = 30 32 36 39;

LoadMask( 7, AttributeList);

Set attributes 30, 32, 36 and 39 within the attribute selection mask with ID 7.

// Load List1 into AttributeList
AttributeList = List1;

// Load List2 into AttributeList
AttributeList = List2;

LoadMask( 7, AttributeList);

Set attributes identified by the two variables List1 and List2 within the attribute selection mask with ID 7. ( Method 1 )

// Add List2 to List1
List1 = List2;

LoadMask( 7, List1);

Set attributes identified by the two variables List1 and List2 within the attribute selection mask with ID 7. ( Method 2 )