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. setFilter
    59. setFlatSort
    60. setFormat
    61. setOptions
    62. setReport
    63. setSort
    64. setTableSizes
    65. showCharts
    66. showGrid
    67. showGridAndCharts
    68. sortingMethod
    69. sortValues
    70. 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
  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

getFlatSort

getFlatSort(): Array

[starting from version: 2.8.2]

Returns an array of objects defining the sorting on the flat grid.

Note that the getFlatSort method is available only for reports based on "csv", "json", and "api" data source types.

Returns

Array of objects. Each object has the following properties:

  • uniqueName – String. The unique name of the hierarchy being sorted.
  • sort – String. The sorting type ("asc", "desc", or "undefined").

If the flat sorting isn’t specified, or all the sorted hierarchies have the "undefined" sorting type, an empty array is returned.

Example

flexmonster.getFlatSort();

/* method returns array of objects
[
   {uniqueName: "Category", sort: "desc"},
   {uniqueName: "Price", sort: "asc"}
]
*/

Try the example on JSFiddle.

See also

setFlatSort
getSort
setSort
sortingMethod