Get Free Trial
API reference
Table of contents

FilterObject

An object used in the custom data source API requests. It contains a query filter.

The FilterObject has the following parameters:

  • fieldFieldObject. The field to apply the filter to.
  • include optional – Array of objects. Field members to include. Each object has the following parameters:
    • member – String | Number. The field’s member. For string field type it is string. For number and date field types it is number.
    • filter optionalFilterObject. Allows filtering multilevel hierarchies. If the member is a parent level of the hierarchy, specify filter to filter the lower levels of the hierarchy. Otherwise, the filter property is not necessary.
  • exclude optional – Array of objects. Field members to exclude. Each object has the following parameters:
    • member – String | Number. The field’s member. For string field type it is string. For number and date field types it is number.
    • filter optionalFilterObject. Allows filtering multilevel hierarchies. If the member is a parent level of the hierarchy, specify filter to filter the lower levels of the hierarchy. Otherwise, the filter property is not necessary.
  • query optional – Object. A conditional filter.
    • (condition) – String|Number|Array of strings| Array of numbers. Value for the condition, where condition to apply is (condition).
  • value optional – Object. The value to which a conditional filter is applied. Contains the following properties:
    • fieldFieldObject. The value by which the data should be filtered.
    • func – String. The aggregation function name. For each field, the list of supported aggregations is defined in the response to the /fields request. Supported values may include: "sum", "count", "distinctcount", "average", "median", "product", "min", "max", "stdevp", "stdevs", "none". Note: for the fields of the "number" type, Flexmonster Pivot supports built-in front-end aggregations.

Examples

Example of the request with the FilterObject:

[{
    "field": FieldObject,
    "include"[]: {
        "member": string | number,
        "filter": FilterObject
    },
    "exclude"[]: {
        "member": string | number,
        "filter": FilterObject
    }, 
    "query": {
        (condition): string | number | string[] | number[]
    },
    "value": {
        "field": FieldObject,
        "func": string
    }
}]

See also

/handshake request
/fields request
/members request
/select request for pivot table
/select request for flat table
/select request for drill-through view