AnsweredAssumed Answered

Simulated tree handling

Question asked by mbeck65 on May 3, 2017
Latest reply on May 8, 2017 by fmpdude

Hello to everybody,

I'm developing a solution that needs a grouping facility useful to dinamically summarize totals in base of the groups definition.

What I'm trying to do is implement something similar to a tree management system based on multiple tables themselves linked.

More easy to explain by using an example instead of try to do it by talking about that...

Attached to this discussion I send an fmp12 file that describes what I mean; inside you can find the following tables:

- data, to store value and fields for summarization

- groupData, to define groups of data

- groupGroup, to define groups of groups (this table contains a field named "level" which describe the tree's level of a node)

- gd_lnk_data, to link groups of data to data

- g_lnk_gd, to link groups to groups

I've also populated all the tables with example data so to create a tree similar to the following:



                  gdg level=1             3

                                                /   \

                  gdg level=0          1     2

                                             /  \       \

                  gdd                   1    2       3

                                         / / \   / \ \     / \ \

                  data              1 2 3 4 5 6  7 8 9


What I would like to do is create a report able to show summarizations per levels but... I am able to do it only for the level 0 (see the report's example inside the solution...)


Have someone ideas on how to do that by knowing also that I would like to have the possibility of go up in the tree's levels definition?


Thanks a lot for your suggestions and don't hesitate to ask in case my explanation in not clear enough.