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

Subgroups and levels... complex question...


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

Recommended Posts

Posted

Background info.

I have four levels of grouping.

level 1 and level 4 are always present.

level 2 and 3 are sometimes present.

data looks something like this (all in one table-can't change it..."supernormalized sort of")

TABLE ( UBBcode code doesn't work for me excuse the ".'s")

id.....level...parent_id....data

1......1.........0..................Q group

2......1.........0..................A and B group

3......2.........2..................A subgroup

4......3.........3..................asdf subsubgroup

5......2.........2..................B subgroup

93....4.........1..................qwerty

94....4.........4..................asdf1

95....4.........4..................asdf2

The given value is the "parent" of a level four record

and i want rows looking like this (depending on level 4 id's):

Level_1..............Level_2.........Level_3..........Level_4

Q group..............None.............None..............qwerty

A & B group.......A group.........asdf group.....asdf1

A & B group.......A group.........asdf group.....asdf2

I can do with just the id's also... But is this possible in fmp?

I was thinking about using scripts (i guess i have to...) but how do i execute a script when a calculated value (level 4 id's) is changed?

/Tobias, fm newbie

Ps:

Does anyone understand what i'm asking?

laugh.gifS

Posted

Sure. Define three calculation fields:

c_level3 = If(PARENT::level = 3, PARENT::data, "None")

c_level2 = If(GPARENT::level = 2, GPARENT::data, "None")

c_level1 = If(PARENT::level = 1, PARENT::data, If(GGPARENT::level = 1, GGPARENT::data, "None"))

Then create a layout with four columns

c_level1 c_level2 c_level3 data

and do a Find on level=4.

HTH

Posted

Don't know if it would help, but I've been playing with category-like display files for some time.

Have a look at a thread called 882Summaries as there's a little sample attached at the end.

This topic is 7856 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.