Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
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
  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. getAllMeasures
    23. getCell
    24. getColumns
    25. getCondition
    26. getFilter
    27. getFlatSort
    28. getFormat
    29. getMeasures
    30. getMembers
    31. getOptions
    32. getReport
    33. getReportFilters
    34. getRows
    35. getSelectedCell
    36. getSort
    37. getTableSizes
    38. getXMLACatalogs
    39. getXMLACubes
    40. getXMLADataSources
    41. getXMLAProviderName
    42. load
    43. off
    44. on
    45. open
    46. openCalculatedValueEditor
    47. openFieldsList
    48. openFilter
    49. print
    50. refresh
    51. removeAllCalculatedMeasures
    52. removeAllConditions
    53. removeCalculatedMeasure
    54. removeCondition
    55. removeSelection
    56. runQuery
    57. save
    58. scrollToColumn
    59. scrollToRow
    60. setFilter
    61. setFlatSort
    62. setFormat
    63. setOptions
    64. setReport
    65. setSort
    66. setTableSizes
    67. showCharts
    68. showGrid
    69. showGridAndCharts
    70. sortingMethod
    71. sortValues
    72. 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