Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Derived hierarchy from current and parent data


This topic is 6732 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Given a table with two columns, I'll call them "Current" and "Parent", which contain the names of a current node and that node's parent, is it possible to derive the full hierarchy for the current node on each record? The resulting hierarchy would appear in a third column on the table.

I'll give an example with folder names (but the same logic should apply, I think, to topics/subtopics, chapters/sections, genealogical trees, org charts, etc.):

GIVEN DATA (RECORD_NUM] CURRENT ; PARENT):

1] FolderA ; -nothing because it is the top-most node in the tree-

2] SubFolder1 ; FolderA

3] SubFolder2 ; SubFolder1

4] SubFolder3 ; SubFolder1

5] SubFolder4 ; SubFolder2

6] FolderB ; -nothing-

7] SubFolder5 ; FolderB

8] SubFolder6 ; FolderB

9] SubFolder7 ; SubFolder6

10] SubFolder8 ; SubFolder7

Is it possible to create a calculation/relationship that will return the following results (in the third column on the table):

1] FolderA

2] FolderA / SubFolder1

3] FolderA / SubFolder1 / SubFolder2

4] FolderA / SubFolder1 / SubFolder3

5] FolderA / SubFolder2 / SubFolder4

6] FolderB

7] FolderB / SubFolder5

8] FolderB / SubFolder6

9] FolderB / SubFolder6 / SubFolder7

10] FolderB / SubFolder6 / SubFolder7 / SubFolder8

If there isn't a calculation that can derive these relationships based on appropriate tunneling, does anyone know a looping script that could build these hierarchies? I have tried to find a related posting on this topic but my search hasn’t turned up anything. I apologize if I’ve missed this solution elsewhere.

-Andrew Bradley

This topic is 6732 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.