Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • FilterObject

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

    Properties

    {
      "field": FieldObject,
      "include": MemberFilterObject[],
      "exclude": MemberFilterObject[],
      "query": {
        (condition): string | number | string[] | number[]
      },
      "value": {
        "field": FieldObject,
        "func": string
      }
    }
    Property/Type Description
    field
    FieldObject
    The field to apply the filter to.
    include
    MemberFilterObject[]
    optional Field members to include.
    exclude
    MemberFilterObject[]
    optional Field members to exclude.
    query
    Object
    optional A conditional filter.
    query.(condition)
    String | Number | String[] | Number[]
    Value for the condition, where condition to apply is (condition).
    value
    Object
    optional The value to which a conditional filter is applied.
    value.field
    FieldObject
    The value by which the data should be filtered.
    value.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

    1. Example of the "query" with an array of FilterObjects, which describes a conditional filter:

    "query": {
      "filter": [{
        "field": {
          "uniqueName": "city"
        },
        "query": {
          "begin": "toro"
        }
      }],
      "aggs": {
        "values": [{
          "func": "sum",
          "field": {
            "uniqueName": "price"
          },
        }],
        "by": {
          "rows": [{
            "uniqueName": "city"
          }]
        }
      }
    }

    2. Example of the "query" with an array of FilterObjects, which describes a value filter:

    "query": {
      "filter": [{
        "field": {
          "uniqueName": "city"
        },
        "query": {
          "top": 3
        },
        "value": {
          "func": "sum",
          "field": {
            "uniqueName": "price"
          }
        }
      }],
      "aggs": {
        "values": [{
          "func": "sum",
          "field": {
            "uniqueName": "price"
          }
        }],
        "by": {
          "rows": [{
            "uniqueName": "city"
          }]
        }
      }
    }

    See also

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