Need a special offer?Find out if your project fits.
+

How can I achieve Table Grouping with Custom API Data Source?

Answered
Rodrigo Arantes asked on March 24, 2021

I managed to enable the grouping functionality through grouping=true option (see screenshot)

options: {
grouping: true
}

But upon sending a request against /select, it sends a JSON structure that doesn't seem to help.

{
"type": "select",
"query": {
"aggs": {
"by": {
"rows": [
{
"uniqueName": "My Field.groups"
}
]
},
"values": [
{
"func": "sum",
"field": {
"uniqueName": "another_field"
}
}
]
}
},
"page": 0,
}

How can this be achieved with Custom API Data Source?

Thanks

1 answer

Public
Vera Didenko Vera Didenko Flexmonster March 25, 2021

Hello, Rodrigo,
 
Thank you for reaching out to us. 
 
We would like to kindly explain that the grouping option is currently available only for CSV/JSON data source types.
 
However, it is possible to group several fields into multilevel hierarchies (see example). You are welcome to check out the following guide for more details on how to implement multilevel hierarchies for the custom data source API.
 
We hope this helps. Please feel free to reach out in case of questions.
 
Kind regards,
Vera

Please login or Register to Submit Answer