Jump to content
Sign in to follow this  
Steve Schmid

how to show 1-M relationships on layouts?

Recommended Posts

Hello folks,

I'm developing a simple relational database as a student assistant on my college campus. I have a database set up with 4 tables.

In short, its for a disciplinary action department on the campus. everything stems from the incident tables. One incident can have one or many charges, and one or many sanctions.

From a layout perspective, I can't figure out how to allow input for multiple charges and multiple sanctions. And then search for an incident and have it display those multiple charges and sanctions.

Does anyone have experience with a situation like this, or am i making any sense? ;)

Share this post


Link to post
Share on other sites

It sounds like you have a good start; 4 tables: Student -> Incident, then 2 children tables of Incident: Charges and Sanctions. On an Incident layout, you can choose the Student. You can also show a portal to Charges, with "Allow creation of related records", and similar to Sanctions.

Back up the relational chain, you can show a portal to Incidents on the Student layout (if you have one), then jump to a particular Incident in the portal, with a button in the row.

What you cannot have is a portal with Incidents on the Student table, including portals to the other 2 tables inside of it; there is no "portal within a portal" capability.

Share this post


Link to post
Share on other sites

Update and some questions...

I created one layout linked to the incident table but the bottom half of the layout also allows for entry of the charges at the same time. If i want to add data into the charges table at the same time, do i need a portal for eahc value?

the same goes for a second layout i created for sanctions. There are fields on the sanction layout that also go into the incident table.

Things are structured this way because of how the user receives the information.

Lastly, when creating relationships in FMP...If i have a 1-M relationship from the incident to charge table, do i create the incident table's primary key field in the charge table and then just connect them? In software like rational rose, if you create a relationship between two tables the foreign key is automatically moved into the many side table

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.