you could define a global field, put it on the layout as popup menu with a list based upon student names, and a onModify trigger that goes to that record via a script.
Thank you siplus,
Now that works nicely for one student (field) but what if I want it to find that record (name) in multiple fields?
Sorry I remembered I had to add new requests so all good. Seems I am learning. Thanks again.
the FM Search box is using QuickFind ... per Siplus, create a global field (ie. gFind) ...set script trigger OnObjectExit to run script:
Set Variable [$find ; Value: Table::gFind]
Perform Quick Find [ $find ]
limit the number of fields you have on your layout that are set to use QuickFind to just those fields you want to search within. Less is better, faster.
7 different fields called Student1, Student2, Student3,
Sounds like you are trying to solve the wrong problem.
This looks like a data structure problem, which I think has been discussed with you before.
WHY do you have fields Student1, Student2, Student3 etc?
These should be related records.
What is this really about, what does this file or layout represent?
Looks like classes; and enrolled students.
I am not sure if we spoke about the structure so forgive me if I have forgotten. I have a Timetable with classes every 30 mins. In each class there are a maximum of 7 students. The layout is based on the Class table and a record exists for each day and time.
The students are in a Contacts table and are sourced via a value list.
It all works nicely now (see below) and with siplus's suggestion I can now easily find a student in all possible places on the timetable but I guess if the structure is not right I will run into problems further down the track so any advice is appreciated.
On re-reading do you mean that I have a Class table and a Contacts (students) table and then I bring those two table together to create a record for each time and student? For example one record would be Mon 3pm John and another record would be Mon 3pm Mary. These records are then brought together in a layout that arranges them the way I want to view them? If so I am still not clear on how to construct this. Perhaps thats why I miss your point last time.
Bruce I have been research the structure and came across this. Understanding and creating many-to-many relationships in FileMaker Pro | FileMaker
Is this what you mean? Having a join table? I have been playing with it and I am getting stuck with a few things.
1. I created a Layout list view for my timetable. On the layout I first added a portal for each day/time (based on the Classes table) and then a portal for the students (based on the Contacts table). The portal scrolls vertically but I want students to be lined horizontally. Is this done by creating 7 student portals each on a different portal row or is there a better way?
2. In the Contacts portal I can add a new student to a class by creating a new Contacts record but I want to be able to also select from a list of current students. In fact I don't want to be creating new Contact records on the timetable. I just want to be selecting from a list because I don't want people on the list unless they are actually an enrolled student. In other words I don't want inquiries, past students etc to be on the Pop-up.
Thank you again.
You don't mention actually creating the join table.
A table; not a layout.
You will need to do that.
The Enrollments table will have, at minimum, ClassID and StudentID.
Thank you dsvail. I appreciate your help.
So my main question now is how should I lay this out correctly now that I have the join table and relationships setup? Which table should my timetable layout be based on? I am guessing the join table. Then how do I add classes and students to those classes? Is this done via portals? Thank you.
No, you probably want to do it in a layout based on Class.
Can you create a clone of your file and post it?
Or are you working with a test file?
I am just using this test file at the moment until I understand it. I created some contacts (students) and classes along with a layout plus a few links to move between the different areas. Thats as far as I've gotten to date.