Jump to content

Portal(?) Help Neded

This topic is 8580 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I need help displaying data. Each record in the database contains, among others, fields for

teacher number,

period taught,

course taught and

period iteration (i.e., whether the course is the first among those taught that period, the second, etc.)

I want to display in a table format the courses taught by teachers by period. The teachers should appear in rows and the periods in columns, with the names of courses in the intersections. (To complicate it, sometimes a teacher will teacher more than one class in a period, but that's not really a problem.)

I've come to the conclusion that I need a portal for each period, but I don't know how to develop a relationship that will display just the courses for a given teacher-period combination.

Please forgive if the description of what I would like to do is clumsy as I am new at this. Any help will be greatly appreciated.

Link to comment
Share on other sites

You're going to need two files for this. One for Teachers and one for Classes.

The Classes file will have fields for Class_Name, Period, and Teacher_ID.

Let's say that there are six possible periods. Then you're going to want to create six calculation fields in the Teachers file that combine the Teacher_ID with the numbers 1 through 6.

Teacher_Period_1 = Teacher_ID & "1"

Teacher_Period_2 = Teacher_ID & "2"


In the Classes file you'll want to create one calculation field that is a combination of the Teacher_ID and the Period fields

Teacher_Period = Teacher_ID & Period

Now you create six relationships from Teachers to Classes using each of the fields in Teachers to match to the Teacher_Period field in Classes

"Classes|Teacher_Period_1" set to "Teacher_Period_1=???:Teacher_Period"

"Classes|Teacher_Period_2" set to "Teacher_Period_2=???:Teacher_Period"


Now create a layout in list view that has the following fields in each column:








That should do the trick. It doesn't use a portal, but it gets the job done.


Link to comment
Share on other sites

  • Newbies

Your solution worked perfectly. I actually implemented it with a self-join because I am developing this for people with little familiarity with FMP and wanted to keep it simple. Thanks!!

You wouldn't happen to know how to:

1. force a subsummary to page break when the records in a category will run over to a second page?

2. enter the total pages of a document in a footer so, e.g., "page 1 of 7" can print?

Link to comment
Share on other sites

Reports are one of my weaker points, but someone else here might know of a way to do what you want with that.

Regarding the other question, however, create a global field called gPage_Count and include it on your layout like:

Page ## of <<gPage_Count>>

Then include the following code in your script:

Enter Preview Mode []

Go to Record/Request/Page [ Last ]

Set Field [ gPage_Count, Status (CurrentPageNumber) ]

Go to Record/Request/Page [ First ]


Link to comment
Share on other sites

This topic is 8580 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

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