How to send columns and rows structure to select api

Answered
Menachem asked on April 17, 2024

I'm working with the Select API and would like to programmatically determine the complete structure of the data, including hidden rows and columns. This information is crucial for filtering purposes.
Desired Behavior:

  • Upon using the Select API, I want to retrieve the full structure of the chart data, encompassing all rows and columns, regardless of their initial visibility.
  • Specifically, for filters applied to closed sections, I need to identify:
    • Whether the filtered property belongs to a row or column.
    • The level of the property within the hierarchy (e.g., "category" is below "cost center").

Attempted Solutions:
I've tried using customizeAPIRequest, but after closing the field list editor, i don't have access to the rows and columns definitions until after the api call is completed, which is not helpful
please let me know if you have any solutions.
Thanks.
 

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster April 18, 2024

Hello, Menachem!

Thank you for reaching out to us.

Kindly note that it is possible to use our other API calls inside the customizeAPIRequest() API call to send the additional information to the server. For example, you can get the current slice with all nested levels by using the getReport() API call.

We have prepared a JSFiddle to illustrate the idea: https://jsfiddle.net/flexmonster/19ouge2b/.

Hope you will find our answer helpful.
Please let us know if the suggested approach works well for you.

Kind regards
Solomiia

Public
Menachem April 18, 2024

Thank you!

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster April 19, 2024

Hello, Menachem!

Thank you for your quik response.

We are glad to hear the suggested solution was helpful.

Feel free to reach out to us if any further questions arise.

Kind regards,
Solomiia

Please login or Register to Submit Answer