Newbies Laurel Posted April 6, 2006 Newbies Posted April 6, 2006 Hello all! I have a database that keeps track of a number of professors. I also have a related database that keeps track of the students who work under these professors. Each record in the Professors database contains a portal listing all the students that are associated with that professor, as well as those students' contact info. Within the Students database, I'd like to have a yes/no radio button field for whether or not a student is required to take an exam. If the answer is yes, I'd like a field to "pop up" that asks the date that exam was taken. If no, nothing happens. Of course, I'd like these fields to be visible within the portal in Professors. I've poked around and looked at the visibility trick, but it looks like it requires a portal, and I can't have a portal in a portal. Is there another way to hide and show this "date of exam" field within the portal? Thanks very much.
Lee Smith Posted April 6, 2006 Posted April 6, 2006 Are you making this more complicated than it needs to be? Couldn't you just use a calculation field that shows the date if applicable? Lee
Newbies Laurel Posted April 10, 2006 Author Newbies Posted April 10, 2006 Are you making this more complicated than it needs to be? I have been known to do that from time to time Couldn't you just use a calculation field that shows the date if applicable? Sure -- can you give me more info? What should the calculation be? Thanks!
Lee Smith Posted April 10, 2006 Posted April 10, 2006 Can you attach a copy of your file with some sample data?
Fenton Posted April 10, 2006 Posted April 10, 2006 (edited) It is possible to have a portal within a portal, as long as the logic still holds true. What is difficult is entering a field within that portal. It can be done via scripts however. See this example. It has invisible portals and buttons, so duplicate the layout to take it apart. What you haven't made clear is whether there is only 1 exam date per student, or whether each student-professor combo can have an exam date. The example has only 1 exam per student, regardless of professor. For a more flexible arrangement you could move the exam fields to the join table, along with the "self_yes" TO, "Yes" constant field, and relationship. It's a bit of a complex kludge, more of a "proof of weird concept", but it seems to work. Alternatively you could just validate the exam date field, that the exam Yes/No field = "Yes". Or attach a script to the exam date field that did much the same, while taking it out of the Tab Order. Either of these would be far simpler. Remember to leave it enterable in Find mode, when desired. Edited April 10, 2006 by Guest Moved file to later post
Newbies Laurel Posted April 10, 2006 Author Newbies Posted April 10, 2006 That's very cool, Fenton -- I'm going to play around with that. Thanks very much to both of you!
Fenton Posted April 10, 2006 Posted April 10, 2006 Here is slight variation. As long as we're using visibility, we might as well put the "edit" graphic inside the portal also. I have to say however that I don't think I would use this method for hiding a data field. It's just too much work, and too weird. I think I'd just use validation or a simple attached script, which accomplishes the main purpose of disallowing data enter when inappropriate. I often use the visibility trick in portals to hide buttons though, like with this edit graphic. StudentExamQuestion.zip
Recommended Posts
This topic is 6854 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 accountSign in
Already have an account? Sign in here.
Sign In Now