Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Constrain Portal Records?

Featured Replies

I have built a database that keeps track of students, courses, teachers, and enrollment.

Both the courses database and the teacher database contain a field for which university they belong to. (We track about 15 different universities.)

Within the Courses layout, I have a popup selection button for the teacher of the course that opens a layout with a portal listing all the teachers in the database.

I would like to have the portal containing the teachers just show the teachers that teach at the university selected in the Course layout. Is it possible to constrain the portal field to just show the university specific teachers?

Any idea?

Edited by Guest

You could use either a global field with the University ID (or name, but really it should be an ID),* or the University ID field of the current course record.

You say "opens a layout with a portal", but you don't tell us who owns that layout (which table occurrence, hence base table it is attached to), nor which table the the portal's relationship is targeted to, nor what the key fields are.

If the portal's layout belongs to Courses, then you could use the University ID to filter the portal. If the portal's layout belongs to Teachers, then you'd set a global field to the University ID of the Course, before leaving (then Commit Record to refresh the portal).

If you don't have a Universities table, then you should; 15 is a lot to be just using their name, kind of bloats the other tables as a foreign key. An acronym would also do, instead of an ID; universities seem to always have those. As long as there is no possibility of a duplicate, ever.

  • Author

Thanks for your quick response. I actually did what you said before I read your reply. I found the answer by studying the attached file from this post: http://fmforums.com/forum/showpost.php?post/261396/

I agree that I should have a table for universities and I probably will eventually. Just trying to get the database completely functional before school starts.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.