Name/Value Filters
Publishers can specify name/value pairs that describe the package that is being published. Knowledge of name/value pairs enables subscribers to filter the packages that they receive.
Publishers are responsible for providing accurate name/value pairs for
the information that they publish.
You can define a name/value pair as either a name or a relationship between a name and a value in the form
name < operator value >
where
Name is a variable to which a value might be assigned. Name is not case-sensitive.
Operator relates the variable to the value. Commonly used operators are the comparison operators and the logical operators, which follow:
Comparison Logical
= equals & AND
!= not equal | OR
? contains
Value in the form of a string or a numeric value is appropriately assigned to the variable. Value is case-sensitive.
The following gives an example of a package description using name/value pairs that a publisher has assigned to a published package:
market=(Mexico, US) type=report Quarter4 sales _priority_=low
Knowing the conventions that a publisher uses to describe packages helps subscribers to write meaningful filters. The following examples illustrate filter strings that determine whether the preceding example entity would be selected by the filter. If the package meets the filter's conditions, the package is delivered to the subscriber.
market=(US, Asia, Europe)
- NO MATCH. Because the equals comparison operator (=) is used, the subscriber's values and the publisher's values that are assigned to the variable name MARKET must match exactly. In this example, the subscriber filters for
US
, Asia
, and Europe
, whereas the publisher assigns a value of Mexico
and US
. The conditions for selection are not met. Therefore, the package is not delivered to the subscriber.
market=(mexico, us)
- NO MATCH. Because the equals comparison operator (=) is used, the subscriber's values and the publisher's values that are assigned to the variable name MARKET must match exactly. In this example, the subscriber's values do not match the publisher's values because of case differences. Therefore, the package is not delivered to the subscriber.
market=US | market=Asia | market=Mexico
- NO MATCH. Because the equals comparison operator (=) is used, the subscriber's values and the publisher's values that are assigned to the variable name MARKET must match exactly. In this example, although the OR operator (|) might seem to cause a matching condition, the equals operator (=) requires that each name/value pair that is separated by an OR operator (|) match the publisher's name/value pair entirely. A match would result if the subscriber's values were written as follows:
market=Mexico, US | market=Asia | market=Mexico
The first name/value pair in the series would match. Therefore, the package would be delivered to the subscriber.
market=(Mexico, US)
- MATCH. Because the equals comparison operator (=) is used, the subscriber's values and the publisher's values that are assigned to the variable name MARKET must match exactly. In this example, the value set does match. Therefore, the package is delivered to the subscriber.
market=(US, Mexico)
- MATCH. Because the equals comparison operator (=) is used, the subscriber's values and the publisher's values that are assigned to the variable name MARKET must match exactly. In this example, the value set matches, regardless of the order of values within the value set. Therefore, the package is delivered to the subscriber.
market?US & market?Asia & market?Mexico
- NO MATCH. The conditions that are specified in the subscriber's name/value pair read: Variable name MARKET must contain the values
US
and Asia
and Mexico
. The contains comparison operator (?) identifies the eligible values for consideration. In this example, although the publisher's variable MARKET contains US
and Mexico
, it does not also contain Asia
. Because the logical AND operator (&) is used, its condition is not satisfied. Therefore, the package is not delivered to the subscriber.
market?US | market?Asia | market?Mexico
- MATCH. The conditions that are specified in the subscriber's name/value pair read: Variable name MARKET must contain the values
US
or Asia
or Mexico
. The contains comparison operator (?) identifies the eligible values for consideration. In this example, the publisher's variable MARKET contains US
, and the logical OR operator (|) condition is satisfied. Therefore, the package is delivered to the subscriber.
Quarter4=sales
- NO MATCH. Because the equals comparison operator (=) is used, the subscriber's values and the publisher's values that are assigned to the variable name QUARTER4 must match exactly. In this example, because the publisher's variable name QUARTER4 does not contain a value, and the subscriber's variable name QUARTER4 does contain a value of
sales
, the value sets do not match. Therefore, the package is not delivered to the subscriber.
Quarter4
- MATCH. Variable names are not required to have values. In this example, because the publisher's variable name QUARTER4 does not have an assigned value and the subscriber's variable name QUARTER4 does not have an assigned value, the value sets match. Therefore, the package is delivered to the subscriber.
type=report & forecast
- NO MATCH. Two conditions must be met. The equals comparison operator (=) requires that the subscriber's values and the publisher's values that are assigned to variable name TYPE match. In this example, the first condition is met because both the publisher and the subscriber assign the value
report
to variable TYPE. However, the AND logical operator (&) also requires that the variable name TYPE also be assigned the value forecast
. Because the publisher's variable name TYPE is not assigned a value of forecast
, the final condition is not met. Therefore, the package is not delivered to the subscriber.
type=report & sales
- MATCH. Two conditions must be met. The equals comparison operator (=) requires that the subscriber's value and the publisher's value that are assigned to variable name TYPE match. In this example, the values match. Both assign the value
report
to the variable name TYPE. The AND logical operator (&) also requires that the variable name SALES match. Because both the publisher and the subscriber identify a variable name SALES with no assigned value, the final condition is also met. Therefore, the package is delivered to the subscriber.
To add a name/value filter, type the filter string into the
NameValue field and click
Enter.
To remove a name/value filter, select the entry and press the
Delete key.
To edit a name/value filter, select the entry, change it, and click
Enter.