🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all the hot features!
Get Free Trial
  1. API reference
    1. Introduction
    2. Flexmonster()
  2. Objects
    1. All objects
    2. Report Object
    3. Data Source Object
    4. Mapping Object
    5. Slice Object
    6. Options Object
    7. Filtering
      1. Filter Object
      2. Number Query Object
      3. String Query Object
      4. Date Query Object
      5. Time Query Object
      6. Value Query Object
    8. Format Object
    9. Conditional Format Object
    10. Table Sizes Object
    11. Cell Data Object
    12. Chart Data Object
    13. Toolbar Object
    14. Chart Legend Data Object
    15. Share Report Connection Object
  3. Methods
    1. All methods
    2. addCalculatedMeasure
    3. addCondition
    4. alert
    5. clear
    6. clearFilter
    7. clearXMLACache
    8. closeFieldsList
    9. collapseAllData
    10. collapseData
    11. connectTo
    12. customizeAPIRequest
    13. customizeCell
    14. customizeChartElement
    15. customizeContextMenu
    16. dispose
    17. expandAllData
    18. expandData
    19. exportTo
    20. getAllConditions
    21. getAllHierarchies
    22. getAllHierarchiesAsync
    23. getAllMeasures
    24. getAllMeasuresAsync
    25. getCell
    26. getColumns
    27. getColumnsAsync
    28. getCondition
    29. getFilter
    30. getFlatSort
    31. getFormat
    32. getMeasures
    33. getMeasuresAsync
    34. getMembers
    35. getMembersAsync
    36. getOptions
    37. getReport
    38. getReportFilters
    39. getReportFiltersAsync
    40. getRows
    41. getRowsAsync
    42. getSelectedCell
    43. getSort
    44. getTableSizes
    45. getXMLACatalogs
    46. getXMLACatalogsAsync
    47. getXMLACubes
    48. getXMLACubesAsync
    49. getXMLADataSources
    50. getXMLADataSourcesAsync
    51. getXMLAProviderName
    52. getXMLAProviderNameAsync
    53. load
    54. off
    55. on
    56. open
    57. openCalculatedValueEditor
    58. openFieldsList
    59. openFilter
    60. print
    61. refresh
    62. removeAllCalculatedMeasures
    63. removeAllConditions
    64. removeCalculatedMeasure
    65. removeCondition
    66. removeSelection
    67. runQuery
    68. save
    69. scrollToColumn
    70. scrollToRow
    71. setFilter
    72. setFlatSort
    73. setFormat
    74. setOptions
    75. setReport
    76. setSort
    77. setTableSizes
    78. shareReport
    79. showCharts
    80. showGrid
    81. showGridAndCharts
    82. sortingMethod
    83. sortValues
    84. updateData
  4. Events
    1. All events
    2. afterchartdraw
    3. aftergriddraw
    4. beforegriddraw
    5. beforetoolbarcreated
    6. cellclick
    7. celldoubleclick
    8. chartclick
    9. datachanged
    10. dataerror
    11. datafilecancelled
    12. dataloaded
    13. drillthroughclose
    14. drillthroughopen
    15. exportcomplete
    16. exportstart
    17. fieldslistclose
    18. fieldslistopen
    19. filterclose
    20. filteropen
    21. loadingdata
    22. loadinglocalization
    23. loadingolapstructure
    24. loadingreportfile
    25. localizationerror
    26. localizationloaded
    27. olapstructureerror
    28. olapstructureloaded
    29. openingreportfile
    30. printcomplete
    31. printstart
    32. querycomplete
    33. queryerror
    34. ready
    35. reportchange
    36. reportcomplete
    37. reportfilecancelled
    38. reportfileerror
    39. runningquery
    40. unauthorizederror
    41. update
  5. Custom data source API
    1. All requests
    2. /handshake request
    3. /fields request
    4. /members request
    5. /select request for the pivot table
    6. /select request for the flat table
    7. /select request for the drill-through view
    8. Field Object
    9. Filter Object
    10. Filter Group Object
  6. MongoDB Connector API
    1. All methods
    2. getSchema
    3. getMembers
    4. getSelectResult
  7. Flexmonster Connector for amCharts
    1. All methods
    2. amcharts.getData
    3. amcharts.getCategoryName
    4. amcharts.getMeasureNameByIndex
    5. amcharts.getNumberOfMeasures
    6. amcharts.getNumberFormatPattern
Table of contents

/fields request

[starting from version: 2.8]

A request for all fields with their types (i.e., meta-object or schema).

Request

{
"type": "fields"
"index": string
}

The request has the following parameters:

  • type — String. The type of the request. In this case, it is "fields".
  • index – String. The dataset identifier.

Response

{
    "fields"[]: {
        "uniqueName": string,
        "type": "string" | "number" | "date",
        "caption": string,
"hierarchy": string,
"parent": string,
        "folder": string,
        "interval": string,
       "aggregations"[]: string,
        "filters": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        }
    },
    "aggregations": string[] | {
       "any"[]: string,
       "date"[]: string,
       "number"[]: string,
       "string"[]: string
    },
    "filters": boolean | {
        "any": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        },
        "date": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        },
        "number": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
        },
        "string": boolean | {
            "members": boolean,
            "query": boolean | string[],
            "valueQuery": boolean | string[]
       },
"advanced": boolean
    },
    "sorted": boolean
}

The response has the following parameters:

  • fields – Array of objects. Contains the following information about fields:
    • uniqueName – String. The field’s unique name. Will later be used in /members and /select requests.
    • type – String. The field’s type. Supported values are: "string", "number", "date".
    • caption (optional) – String. The field’s caption to appear on the UI.
    • hierarchy (optional) – String. The hierarchy’s name. Used to configure multilevel hierarchies. Specify this property to set the field as a level of a hierarchy.
      See how to configure multilevel hierarchies.
    • parent (optional) – String. The parent level’s unique name. This property is necessary to specify if the field is a level of a hierarchy and has a parent level.
      See how to configure multilevel hierarchies.
    • folder (optional) – String. The field’s folder. Folders are used to organize groups of fields in the Field List. folder supports nesting via / (e.g., "Folder/Subfolder").
    • interval (optional) – String. A date’s aggregation interval to group dates on the server. The component will automatically send it in /members and /select requests. Possible values depend on how the server handles date intervals. Only for fields of the "date" type.
    • aggregations (optional) – Array of strings. A list of supported aggregation functions for the field. To define supported aggregations for all fields, use the root aggregations property.
      Supported values include: "sum", "count", "distinctcount", "average", "median", "product", "min", "max", "stdevp", "stdevs", "none", or a custom aggregation. Note: for the fields of the "number" type, Flexmonster Pivot supports built-in front-end aggregations.
    • filters (optional) – Boolean|Object. Supported filters for the field. To define supported filters for all fields, specify the root filters property.
      Filters for the field can be enabled all at once by setting this property to true, or each filter type can be turned on separately:
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled for the field in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for “string”, “number”, and “date” field types.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
  • aggregations (optional) – Array of strings|Object. Supported aggregation functions for all fields or fields of a certain type. Supported aggregations for a certain field can be defined in the fields.aggregations property.
    To define supported aggregations for all fields, specify aggregations as an array of strings. Supported values include: "sum", "count", "distinctcount", "average", "median", "product", "min", "max","stdevp", "stdevs", "none", or a custom aggregation. Note: for the fields of the "number" type, Flexmonster Pivot supports built-in front-end aggregations.
    To define supported aggregations for certain field types, specify the aggregations property as an object with the following properties:
    • any (optional) – Array of strings. Supported aggregation functions for any field type.
    • date (optional) – Array of strings. Supported aggregation functions for the "date" field type.
    • number (optional) – Array of strings. Supported aggregation functions for the "number" field type. Note: for the fields of this type, Flexmonster Pivot supports built-in front-end aggregations.
    • string (optional) – Array of strings. Supported aggregation functions for the "string" field type.
  • filters (optional) – Boolean|Object. Supported filters for all fields or for fields of a certain type. To define filters for a specific field, use the fields.filters property.
    The filters for all fields are turned off by default. They can be turned on all at once by setting this property to true, or each filter type can be configured separately for fields of a certain type:
    • any (optional) – Boolean|Object. Supported filters for any field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. There are 4 common conditions for all field types that can be specified here: "equal", "not_equal", "between", "not_between".
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • date (optional) – Boolean|Object. Supported filters for the "date" field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for the “date” field type.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • number (optional) – Boolean|Object. Supported filters for the "number" field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for the “number” field type.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • string (optional) – Boolean|Object. Supported filters for the "string" field type.
      • members (optional) – Boolean. A configuration of an include/exclude members filter. If true, the members filter is enabled in Flexmonster.
      • query (optional) – Boolean|Array of strings. A configuration of a conditional filter on members. To turn on this filter, either set query to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the members filter. See the list of supported conditions for the “string” field type.
      • valueQuery (optional) – Boolean|Array of strings. A configuration of a conditional filter on values. To turn on this filter, either set valueQuery to true or specify an array of supported conditions.
        If the property is set to true, this enables all the conditions that exist in Flexmonster for the values filter. See the list of supported conditions.
    • advanced – Boolean. Indicates whether the server has advanced hierarchical filters implemented. When the advanced parameter is set to true, it means that the server supports hierarchies and can filter them, so multilevel hierarchies can be configured in the component. When the parameter is false, the server cannot filter the hierarchical data. In this case, if multilevel hierarchies were configured in the Mapping Object, these configurations will be ignored. Default value: false.
  • sorted (optional) – Boolean. If true, the fields’ order from the response will be used to display fields in the Field List.

See also

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