21
CHAPTER 2
Working with Filters
The data and information in your company’s Macromedia Breeze content repository can grow
significantly over time. When this occurs, you might not want to list every item in the repository
for all users. For example, you could list the most recently created courses and the latest quarterly
financial results presentation on your company’s intranet. You need to sort and organize your
growing repository to ensure that users quickly find the information they are seeking.
Filters are the mechanism within Macromedia Breeze XML web services that you can use to
define the criteria for retrieving data from Breeze. You use one or more filters with a specific XML
API to ensure that the data your users see matches exactly what they are seeking.
About filters
You can filter for many (but not all) fields in the XML, and you can filter to include values for
that field or exclude values for that field. You can also sort the results and filter the return set to
include less results, for example, the first 25 rows that match.
Filters work with action calls to modify or organize the data that the Breeze server returns. Filters
help you select data, exclude data, and even sort the data you need to see. For example, you can
request all your courses or use a filter to select only courses that include the word “Java”; you can
list all users or select only users with the last name Smith and sort by their login name.
To use a filter, append it to an action call with an ampersand (&), as in the following:
report-my-course&filter-like-name=Java
You can string multiple filters together, each separated by an ampersand (&), as in the following:
report-my-course&filter-like-name=Java&sort-date-begin=desc
As you can see, filters comprise a
type
(either
filter
or
sort
) with an optional
modifier
(for
example,
like
), the name of the
field
(for example,
name
), if needed, and finally, the
value
of the
field name (for example,
Java
). The following is the filter format:
Type-Modifier-FieldName=Value
There are two types of filters, a basic filter, which begins with the word
filter
, and a sort filter,
which begins with the word
sort
. You can combine sort filters and regular filters as needed to
achieve your desired results. For more information about sort filters, see
“About sort filters”
on page 23
.
Содержание BREEZE 5
Страница 1: ...Breeze Integration Guide ...
Страница 40: ...40 Chapter 3 Common Tasks ...