Skip to content

Latest commit

 

History

History
55 lines (25 loc) · 1.93 KB

File metadata and controls

55 lines (25 loc) · 1.93 KB

Filter Node Instance

A filter node instance filters and returns only the results that match the specified expressions.

The $filter system query option restricts the set of items returned. It allows you to filter are source collection addressed by a request URI. The expression specified with $filter is evaluated for each resource in the collection. Only items where the expression is true are included in the response.

In this example, you want to read a collection of sales orders and get only the unpaid orders. Here's an example of the OData request:

Sample Code:

GET http://host/service/SalesOrders?$filter=Payment eq ‘open’

A filter expression is described by a filter node instance that a filter factory instance creates and can be set into the Client Proxy instance.

Note:

The filter nodes are not OData protocol-specific (Version 2 or Version 4).

A filter node instance is always created by a filter factory instance. You can create a filter factory instance in a read list request instance.

The main functionality of filter node instances is to create a filter expression for a read request on an entity list, which can be integrated into the corresponding request to only show a subset of the complete result.

For examples of how to create and work with filter nodes, see $filter Option.

Related Information

OData Request: Read Entity