Is it possible to retrieve all hierarchy levels through API?

Answered
davide dimola asked 7 days ago

Hi,
 
I’ve this dimension defined in my mondrian 4 xml file:
 
<Dimension name=’Customers’ table=’USERS’ key=’customer_id’>
<Attributes>
<Attribute name=’state’ keyColumn=’STATE’ hasHierarchy=’false’ />
<Attribute name=’customer_id’ keyColumn=’ID’ nameColumn=’NAME’ hasHierarchy=’false’/>
</Attributes>
<Hierarchies>
<Hierarchy name=’state’>
<Level attribute=’state’ uniqueMembers=’false’/>
<Level attribute=’customer_id’/>
</Hierarchy>
</Hierarchies>
</Dimension>
 
I need to retrieve somehow the two levels “state” and “customer_id” (from the UI point of view the same highlighted in yellow in the attached screenshot), but i cant find any API to achieve this.
 
Am I missing something? Is there any API to retrieve this kind of data?
 
Thanks,
Davide

5 answers

Public
Vera Didenko Flexmonster 6 days ago

Hello, 
 
Thank you for your question.
 
Could you please provide more details on your use case so that our team can suggest the best approach for your case?
 
We are looking forward to hearing from you.
 
Best Regards,
Vera

Public
davide dimola 6 days ago

Sure:
 
the modal used to set colums, rows and measure does not fit with our company UI guidelines, so I’m trying to move out the configuration of the pivot table to the same “UI level” of the pivot table itself.
For a more detailed view please check the image in the attachment (sorry for the really bad quality).
 
Is that clear enought?
 
Thanks,
Davide

Attachments:
USE_CASE.png

Public
Tanya Gryshko Flexmonster 3 days ago

Hello, Davide,

Thank you for your quick reply and for providing more details.

We would like to inform you that it is possible to configure the Field List to be shown on the right instead of the pop-up window. Please consider the following example: https://jsfiddle.net/flexmonster/qmLuesxw/. Does it work for you?
Also, some additional CSS styles might be applied to the Field List. For example, here is a compact Field List: https://jsfiddle.net/flexmonster/rknvL123/.

In case you prefer to create your own Field List, we could extend getAllHierarchies() to return information about the hierarchy levels. Please let us know if this option seems more promising to you.

Regards,
Tanya

Public
davide dimola 2 days ago

Hi Tanya,
 
thanks for the support, the shown example with the modal on the right is quite usefull.
But we’ll prefer a more “programmatic” way in order to make component separation possibile  on component oriented frameworks like React (which our company is using) and Angular.
If FlexMonster team is going to implement this feature, is there any approximate release date?
 
Thanks,
Davide

Public
Tanya Gryshko Flexmonster 2 days ago

Hello, Davide,

Thank you for your answer.

Our development team will extend getAllHierarchies() to return information about the hierarchy levels and release this update on the 12th of August.

Please let us know in case of other questions.

Regards,
Tanya

Please login or Register to Submit Answer