Skip 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.

Filtering a Schedule List by Period Number

Featured Replies

Hello, I have a database with that has a student schedule. The schedule consists of 8 different records related to the student ID. So there are 8 periods per student. Currently, I have the list that shows the student schedule from Period 1 to 8 and consists of The Period Number and Room Number. However, I only want the List to show Period number 7 so I can sort the records by the room number and not have to manually sort it myself when I print it out.

I have it done by using a portal and filtering it by period = 7 but when I go to sort it does not sort out by room number. 

Double click your portal in layout mode and choose your sort option there. 

  • Author

I think I know what you mean but what I am trying to do is send a letter to every student in the school. So what I have is a letter layout and then the portal of the students let say 8th period in the bottom right corner of the letter. I want to sort the letters by room number this way I get the room stack go to the room and pass them out. When i go to sort by room number nothing happens, I'm assuming it's because it's through the portal.

Filtering and portal sorting is not going to help you when you sort the parent records. One alternative might be to find and print your letters from the Period table context. Another way might be to create a calculated field to derive the Period you want, or just a static text or number field that you set manually or via script.

  • Author

Yes, you are right, filtering and sorting a portal is not helping me. I uploaded a screenshot of part of the letter so others can understand better. I am not trying to filter or sort the portal, I have already done that.

This is where I am lost Fitch. I am not sure how the calculation would look like so that I ONLY get the room number of their seventh period or 8th period. Whichever I chose so after I do I can sort the records, not portal, by room number and simply print them ready to pass out.

Sorry if I may have worded my previous posts poorly and didn't get my correct message across.

Screen Shot 2015-05-26 at 5.19.56 PM.png

I think your form should be based on the Schedule table, where you can find exactly the record(s) you need, plus have access to all of the related Student data; like:

Enter Find Mode
Go to Layout [ Schedule_FormPrint (Schedule ) ]
Set Field [ Schedule::period ; 7 ]
Perform Find
# next step necessary?
Sort Records [ by Schedule::roomNumber ]
Print []

Edited by eos

eos spelled out nicely my first suggestion. I agree this will probably be the easiest method to implement.

But if you prefer to stick with the Student layout, you could do the Find as eos described, and then while on the Schedule layout, set a (non-calculated) field in Student via a relationship, either with a looping script or using the Replace Field Contents command.

If you were to instead use a calculated solution, it would be a little complicated. You'd need an unstored calculated field using a function like this in the Schedule table. This would allow you to know the value number of Period 7 in your list of related records, i.e., where it falls in the list. And then you'd use GetNthRecord with that calculated result to get the room number.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.