PDA

View Full Version : newbie - hierarchical/tree layout tutorials/ideas?


dwtfm
05-22-03, 16:30
Greetings,

Relatively new to FileMaker and am working on
a stand-alone app.

I'm wondering if it is possible to display information
in a layout similar to those expand/contract navigation
menus one sees on web sites (tho I'm working on a
stand-alone app and not a web app.)

A silly example... say I have rows like:

fieldA fieldB
----------------
fruit apple
fruit banana
fruit pear
color red
color blue
color yellow
color green
pets dog
pets cat
pets fish

and I want to have the user see something like:

----------------
fruit
colors
pets
----------------

and then if they click on "colors" they'd see:

----------------
fruit
colors
red
blue
yellow
green
pets
----------------

and if they clicked "colors" again it would "reclose" etc.

I wondered if there was some way to dynamically
enable/disable the display of fields or parts or portals
in a layout?

Any pointers to tutorials or examples would be most
welcome. I'll summarize the responses/results if there's
interest.

Thx,
Dave

Chris Catillo
05-23-03, 13:31
One solution is to create...

*a global text field
*a relationship from 'global' to 'field a'
*then create a portal using this relationnship
and in the portal put 'field b'

Whatever value you put in 'global' will make the portal show its relationships.

If 'global' has "fruit" in it the portal will show "apple,bannana,ect."

I've included a file for you called "sample.fp5".
Due to upload restrictions its called "sample.zip" (it is not a zip file)
so before opening it rename it to "sample.fp5".

Hope this helps

dwtfm
05-28-03, 18:35
Chris,

Thanks for the reply and your example. I had ended up
using portals as well though the use of a global was
something I hadn't fully considered; I ended up just having
all the portals displayed - i.e. all the "subsections" open.
I'll try out your suggestion as well.

I gather that globals get used generally as "variables" -
that's the message I get from everything I read.
I guess if memory for a global is only allocated once then
that makes sense.

Thanks again,
--Dave