May 26, 201510 yr 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.
May 26, 201510 yr 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.
May 26, 201510 yr Read about displaying portal records in the help Creating portals to display related records and sorting portal records Filtering records in Portals
May 27, 201510 yr 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.
May 27, 201510 yr 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.
May 27, 201510 yr 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 ModeGo to Layout [ Schedule_FormPrint (Schedule ) ]Set Field [ Schedule::period ; 7 ]Perform Find# next step necessary?Sort Records [ by Schedule::roomNumber ]Print [] Edited May 27, 201510 yr by eos
May 27, 201510 yr 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