February 17, 200322 yr Newbies How to I represent a two-deep one-to-many relationship? A good example is a database storing book information. Assume the relationship between library and book is one-to-many. Assume the relationship between book and chapter is one-to-many. How would I represent this information from the
February 17, 200322 yr Hi Jason, Chapters from books could be displayed in Library using a global field for a relationship. Create a g_book field All books are displayed in a portal in the library file. When clicking in a portal row, define a script to set g_book = book_ID (assuming each book has an ID) Create a Portal in Library with relationship Library:g_book_ID::Chapters:book_ID(Assuming your Chapter file has a Book_ID next to the Chapter_ID). You can now see the chapters from a book within the Library file. Is it what you need ?
February 17, 200322 yr Author Newbies Thanks. That's exactly what I needed! What are your thoughts on using FileMaker for a relational database? I'm I going to run into things that I can't do with FileMaker?
February 17, 200322 yr Well, I really can tell that I am everyday some more surprised by FM capabilities and relational design... I think the only limit would be for a huge multi user system, but as this is not my problem, I agree with most of those folks here : There is nothing FM cannot do...even using some workarounds. Tell if you had difficulties in setting this up.
February 20, 200322 yr Author Newbies I had no problems viewing a record that was 2 one-to-many relationships away using the global variable. I also set it up so that I could edit the record 2 relationships away. I added another neat feature. My portal is so large that it takes up a big part of the screen. So I set up the script so that when you click a button to see the detail it also takes you to the other part of the screen where the detail is shown. It acts similar to a bookmark in HTML. This is how I did it: -Create a text field that auto-enters data containing the title of your detail section. Make the field uneditable and don
February 20, 200322 yr Author Newbies Dilucaugo, I was looking at your original directions. How would you change the global variable whenever a portal record was entered? What script functions would do that? I'm currently using a button to do the same thing. Thanks.
February 20, 200322 yr If I understand, you would like to edit and create new Chapters while being in the Library file, using the global. Here is attached a test file with the kind of relationship I will use to set entries in a two relations away using a single file.
Create an account or sign in to comment