Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #2977

Re: Can't Use a Portal Across a Join Table

From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: Can't Use a Portal Across a Join Table
Date 2018-01-25 09:26 +1300
Organization Aioe.org NNTP Server
Message-ID <p4aq5n$1hd9$1@gioia.aioe.org> (permalink)
References <1nizcc3.1qzl4lc1ahxawaN%csampson@inetworld.net> <p449v8$aja$1@dont-email.me>

Show all headers | View raw


On 2018-01-22 09:13:09 +0000, ursus.kirk@gmail.com said:

> Op 21-1-2018 om 22:55 schreef Charles H. Sampson:
>> I'm back to trying to understand the FMP way of implementing a
>> many-to-many relationship. To do this, I'm using the example in the
>> online FileMaker help. Three tables: Students, Classes, and Enrollments.
>> Enrollments is the join table between Students and Classes.
>> 
>> As suggested, I have created a portal from the Students table to the
>> Classes table, presumably through the Enrollments table. I have checked
>> the box to allow creation of an Enrollments table by means of the
>> relationship from Students to Enrollments. (I want to be able to create
>> an enrollment by using the portal.) I have not checked the box to allow
>> creation of a classes record by means of the relationship from
>> Enrollments to Classes. (Students are not allow to sign up for
>> non-existant classes, thereby creating the class.)
>> 
>> Now I'm at the same place that I was in another post. I'm when I go into
>> browse mode with the layout that contains the portal, the portal is just
>> a white box. Nothing can be entered into it.
>> 
>> An aside. The old  Borland database program, Reflex Plus, handled
>> many-to-many relationships for you. I assume there was a join table, but
>> it was hidden and the user didn't have to worry about it.
>> 
>> Charlie
> 
> Charles,
> Using a join table is different. Basically to join students to classes 
> the join table functions as an enrolment table
> But to see the students in a portal from classes there have to be two 
> valid relations.
> first from classes to enrolments (the join table)
> and also from enrolments to students
> 
> I have found no other way then to script this.
> When I am in the classes table and want to joint a student to current 
> class I would you a script that guides me throught the process. Step 
> one store the class_ID (in a global field). goto a search page for the 
> student. Find the student (searching or scrolling or what ever). In the 
> student-record hit a button for a new script that stores the 
> student_id. Now go to the enrolment table, let the script create a new 
> record, fill in the two ID's you have stored (also by script) and go 
> back to the classes and the newly joined student will show up through a 
> correctly set up portal.
> 
> Now there is quite a bit more involved in this. Like safety features 
> that filter cancels and guides that lead you through the steps. Forcing 
> to take an appropriate step each time. Also allowing to add new 
> students and new classes midway through the process. It is perhaps not 
> as clean as we would like, but it works flawlessly for me and I use 
> this system often with join-tables.

You don't need a Script, although whether or not that is more efficient 
is a different question.

If you're entering Enrolment records in a Portal, then you already have 
the IDs needed - one from the current record and one for the opposite 
side of the enrolment. To use your example, if entering enrolments via 
a Portal in the Classes Table, then FileMaker already has the current 
ClassID and you type the StudentID into one of the Portal Fields.

To make things easier for the user, the database often does not use 
visible / user-entered IDs, so instead you enter the student's *name* 
when creating the Enrolment record in the Portal. In that case, an 
Auto-enter option for the hidden StudentID can retrieve that data using 
a second Enrolments->Students Relationship based on the StudentName.

You can have a problem is there are students with the same name or one 
has a subset of another's name (e.g. "John Smith" and "John Smithson"). 
FileMaker can display an error message when such 'duplicate' named 
records are created, so the nuser can rename the new one (e.g. "John 
Smith 2" instead of "John Smith").

There also used to be a slight issue when using old versions of 
FileMaker and you changed the name (the ID wouldn't automatically 
change), but in newer versions the Auto-enter option can be set to 
automatically update (making it almost the same as a Calculation Field).

Helpful Harry   :o)


Back to comp.databases.filemaker | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Can't Use a Portal Across a Join Table csampson@inetworld.net (Charles H. Sampson) - 2018-01-21 13:55 -0800
  Re: Can't Use a Portal Across a Join Table Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-01-22 18:53 +1300
  Re: Can't Use a Portal Across a Join Table Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-01-22 18:57 +1300
  Re: Can't Use a Portal Across a Join Table ursus.kirk@gmail.com - 2018-01-22 10:13 +0100
    Re: Can't Use a Portal Across a Join Table Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-01-25 09:26 +1300
  Re: Can't Use a Portal Across a Join Table csampson@inetworld.net (Charles H. Sampson) - 2018-02-03 11:36 -0800
    Re: Can't Use a Portal Across a Join Table Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-02-04 10:02 +1300
      Re: Can't Use a Portal Across a Join Table csampson@inetworld.net (Charles H. Sampson) - 2018-02-06 02:12 -0800
        Re: Can't Use a Portal Across a Join Table Helpful Harry <HelpfulHarry@BusyWorking.com> - 2018-02-07 09:15 +1300

csiph-web