Here are two bugs we've found when using a Hierarchy with a Custom Data Source API implementation
https://jsfiddle.net/ezk84/Ls50pavt/9/
Here I have a 4 level Date hierarchy with a special Day member 0
I have included in the example the actual (correct as per the data) response that my server sends to these erroneous queries so the example works.
Regards,
Ezequiel
Hello, Ezequiel!
Thank you for reporting these issues.
Currently, all levels of multilevel hierarchies in Flexmonster should have the "string" type.
The reason for the issue is that you have different data types in the "Date" hierarchy. Inside the getSchema
function (/fields
request), "Year"
and "Day"
fields are having type: "number"
, while "Quarter"
and "Month"
– type: "string"
. When all the types inside the hierarchy are set as "string"
, the request query will be correct.
Please see this JSFiddle, based on your example, with filter queries working as expected: https://jsfiddle.net/flexmonster/0n6ukejc/.
Feel free to contact us if any other questions arise.
Best Regards,
Maksym
Okay, thank you. It's not an intuitive reason, but understandable.
Would be good if the documentation made this restriction on hierarchy fields clear.
Cheers,
Ezequiel
Hi, Ezequiel
Thank you for your feedback.
We will take a closer look and improve the multilevel hierarchy section.
As always, feel free to reach out to us if further questions arise.
Best Regards,
Maksym
Hi, Ezequiel!
Hope you are doing well.
Our team has researched the usage of different types with multilevel hierarchies. We concluded that the usage of different types should be an available option. Therefore, we fixed these issues in the newest minor release v. 2.9.24. You are welcome to update the component.
Here is our update to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
Best Regards,
Maksym
Oh that's great. Thanks for the update Flexmonster team!
Works like a charm.
Hi, Ezequiel!
We are happy to hear that our fix works for you.
Please let us know if any other questions arise.
Best Regards,
Maksym