dbTalk Databases Forums  

Creating unique related records

comp.databases.filemaker comp.databases.filemaker


Discuss Creating unique related records in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott Trotter
 
Posts: n/a

Default Creating unique related records - 11-22-2010 , 10:26 AM






I have a database for completed assignments for students. Because of the
nature of our school, any kid can be in one or more of my classes, and
can be at any point in those classes. There are four classes, and each
class has about fifteen chapters. Each chapter has a dozen data fields
and a couple of calculations. My current database is flat, and obviously
has a whole bunch of fields.

The thing is, the individual chapter data for all the classes could
conceivably be identical. I would like to use a separate table with a
single standardized related "chapter" record that would be displayed in
portals for each chapter in each class.

However, I don't know how to set up 60 or so portals so that an entry in
any one creates a different related record. Suggestions?

Reply With Quote
  #2  
Old   
Lynn Allen
 
Posts: n/a

Default Re: Creating unique related recordsX-TraceApproved - 11-22-2010 , 11:24 AM






On 2010-11-22 08:26:38 -0800, Scott Trotter <scotttro (AT) sbcglobal (DOT) net> said:

Quote:
I have a database for completed assignments for students. Because of the
nature of our school, any kid can be in one or more of my classes, and
can be at any point in those classes. There are four classes, and each
class has about fifteen chapters. Each chapter has a dozen data fields
and a couple of calculations. My current database is flat, and obviously
has a whole bunch of fields.

The thing is, the individual chapter data for all the classes could
conceivably be identical. I would like to use a separate table with a
single standardized related "chapter" record that would be displayed in
portals for each chapter in each class.

However, I don't know how to set up 60 or so portals so that an entry in
any one creates a different related record. Suggestions?
No need for 60 portals.

What you need is a child table of students called "assignments."

In the table, put fields for Student ID, Class, Chapter, and the dozen
data fields you need to record chapter specific data.

Relate this to the student table by Student ID, and in the relationship
graph, be sure to allow creation of records in the Assignment table.

Put a single portal on the student record. On the Chapter field, put a
value list with the list of chapter numbers or titles, whichever you
use.

On the Class field, put a value list with the class list.

When you use a pulldown to enter a value in the first field in the
empty portal line, the Student ID field will be entered automatically.
Then fill in the chapter name/number field, and the other appropriate
data.

Now, you can also create a layout (based on a table) that shows
Classes, and relate it to the class field in the assignments table, so
you can see all the records for students in that class.

If you wanted to be fancy, you could do the same for Chapters.

But the best thing is that a list layout based on Assignments can be
sliced and diced any way you want to see the data, sorted by student,
by class or by assignment, at any date or in a date range, (make sure
to put a date field in the table, of course), or on any of the
additional parameters. This is going to be the core reporting table for
your solution.

--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: Creating unique related records - 11-22-2010 , 04:16 PM



Hi Scott,

If you think you need 60 portals you will have to rethink your design
strategy.

With a flat file you are never going to accomplish what you need.
You have to think about redesigning.
Therefore you need to think what data belongs where.
You will get a couple one-one relationships
But also you will need many-many relationships
These last tie in the students who can follow many classes, but each class
may also have many students
If a chapter may belong to more then one class these will have to go into a
many-many relationship as well.

Personaly I never use portals to create related records. I know heaps of
people do that, but for me it just doesn't work. I rather create a script
and a layout that work together. But that is all a matter of taste.

So your learningcurve starts with redesigning and many-to-many
relationships.

--

Hou je goed / keep well,

Ursus

"Scott Trotter" <scotttro (AT) sbcglobal (DOT) net> schreef in bericht
news:scotttro-6FB68A.08260822112010 (AT) news-40 (DOT) giganews.com...
Quote:
I have a database for completed assignments for students. Because of the
nature of our school, any kid can be in one or more of my classes, and
can be at any point in those classes. There are four classes, and each
class has about fifteen chapters. Each chapter has a dozen data fields
and a couple of calculations. My current database is flat, and obviously
has a whole bunch of fields.

The thing is, the individual chapter data for all the classes could
conceivably be identical. I would like to use a separate table with a
single standardized related "chapter" record that would be displayed in
portals for each chapter in each class.

However, I don't know how to set up 60 or so portals so that an entry in
any one creates a different related record. Suggestions?

Reply With Quote
  #4  
Old   
Scott Trotter
 
Posts: n/a

Default Re: Creating unique related records - 11-24-2010 , 10:19 AM



Ursus, Lynn, thanks for the input.

My problem with the related records in a single portal is that students
may begin the class at any point in the class. Their first assignment
entry could be in Chapter 5, for instance. The problem is that Filemaker
will only give me the "next" related record, which is for new student
record is Chapter 1 assignment 1. So I'd end up entering an item for
Chapter 1, then deleting it, then entering an item for Chapter 2, then
deleting it, so on, until I got up to Chapter 5. See the problem?

I need to be able to input into any chapter in any order.

Reply With Quote
  #5  
Old   
 
Posts: n/a

Default Re: Creating unique related records - 11-24-2010 , 12:12 PM



It seems to me you are using your auto-generated ID for numbering within a
sequence. If so, then you shouldn't do that. An ID should mean nothing and
should not be used for anything else but identifying a record (within
relationships for instance). It shouldn't be used for identfying visually or
as a base for a sequence on which you want to do anything with (like sort or
find )
You should manually give the first chapter a student begins with.
From that point onwards you might auto-increment, but since you want
randomness you should rely on manual input only for the chapters.

--

Hou je goed / keep well,

Ursus

"Scott Trotter" <scotttro (AT) sbcglobal (DOT) net> schreef in bericht
news:scotttro-3BF3B7.08185924112010 (AT) news-40 (DOT) giganews.com...
Quote:
Ursus, Lynn, thanks for the input.

My problem with the related records in a single portal is that students
may begin the class at any point in the class. Their first assignment
entry could be in Chapter 5, for instance. The problem is that Filemaker
will only give me the "next" related record, which is for new student
record is Chapter 1 assignment 1. So I'd end up entering an item for
Chapter 1, then deleting it, then entering an item for Chapter 2, then
deleting it, so on, until I got up to Chapter 5. See the problem?

I need to be able to input into any chapter in any order.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.