Hierachical information

Hello,

I’m new to Easymorph and I’ve been learning a lot over the past few days.
We have an ERP (ODOO) which uses many tables to represent hierarchical information.
For information, I found this way of representing hierarchical information in a lot of software.
Below is an example of the structure :

id parent_id value
1 Null Alsace
2 1 Region 1
3 1 Region 2
4 2 Sub Region 1
5 2 Sub Region 2
6 Null Paca
7 6 Region 1
8 6 Region 2
9 8 Sub Region 1
10 8 Sub Region 2
11 10 Sub Region 2/1
12 10 Sub Region 2/2

In Qlik we have a specific function that allows easily retrieve/transform this kind of information in this way in a new table or in the form of a string separated by characters:

Field1 Field2 Field3
Alsace Region 1 Sub Region 1
Alsace Region 2
Paca Region 1
Paca Region 2 Sub Region 2/1
Paca Region 2 Sub Region 2/2

or

Alsace\Region 1\Sub Region 1
Alsace\Region 2
Paca\Region 1
Paca\Region 2\Sub Region 2/1
Paca\Region 2\Sub Region 2/2

How is it possible to deal with this in Easymorph?

Hi,

have a look to this post

Regards

Hi Ludovic and welcome to the Community!

At this point, EasyMorph doesn’t have a built-in way of building hierarchies (apparently, we should add one).

If you know that your hierarchy has a fixed max number of levels (e.g. 4 in your example), you can do self-joins as in the project below. If the max level of hierarchy numbers is not known, you can use the “Repeat” action to process hierarchical structures, as proposed by @cvo above, but that’s an advanced technique that requires a bit of learning.

4-level-hierarchy.morph (11.5 KB)