Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a set of hierarchical data like this:
LOAD * Inline [
MEMBER, TEAM, BOSS, HIERARCHIAL
Donald Duck, Alpha, 2, Yes
Mickey Mouse, Alpha, 1, Yes
Trasan Apanson, Alpha, 1, Yes
Donald Duck, Beta, 1, Yes
Trasan Apanson, Beta, 2, Yes
Donald Duck, Gamma, 0, No
Mickey Mouse, Zeta, 0, No
Trasan Apanson, Zeta, 0, No
Mickey Mouse, Pi, 2, Yes
Trasan Apanson, Pi, 2, Yes
Donald Duck, Pi, 1, Yes
];
Now I would like to display the hierarchy of the different Teams, i.e. the name of the Boss (if there is a boss on the team, may also be more than one boss on a single team) and the related servants (one or more, present on every team).
I want to fill the table at the bottom...
(Sample data & tables attached as a qvf )
Hi Vegar,
2 is boss. If the team have one or more bosses the servant(s) ranks as 1. For teams without a boss the servant(s) ranks as 0.
/BR
What if you did something like this?
[TEAMS]: LOAD * Inline [ MEMBER, TEAM, BOSS, HIERARCHIAL Donald Duck, Alpha, 2, Yes Mickey Mouse, Alpha, 1, Yes Trasan Apanson, Alpha, 1, Yes Donald Duck, Beta, 1, Yes Trasan Apanson, Beta, 2, Yes Donald Duck, Gamma, 0, No Mickey Mouse, Zeta, 0, No Trasan Apanson, Zeta, 0, No Mickey Mouse, Pi, 2, Yes Trasan Apanson, Pi, 2, Yes Donald Duck, Pi, 1, Yes ]; Bosses: LOAD TEAM, MEMBER as [Boss (name)] Resident TEAMS WHERE BOSS =2; Servants: LOAD TEAM, MEMBER as [Servant (name)] Resident TEAMS WHERE BOSS =1;