Adam Runtime Posted June 7, 2004 Posted June 7, 2004 Hi, i've had a quick nose around for examples, cant find anything so far so ...: I am new to FM, and I need to validate certain fields to prevent duplicate data and, in this instance, I have a Day table and a Session table, and I need to make sure that no sessions are referenced in more than one day. I also need to validate sessions in terms of tutors who run the sessions, to make sure no tutor is booked for more than one session at a time. Any help much appreciated!! Thanks Adam.
RalphL Posted June 7, 2004 Posted June 7, 2004 Adam Runtime said: I have a Day table and a Session table, and I need to make sure that no sessions are referenced in more than one day. Are you saying that a session is unique to a day? Or do you mean that a session can be given only once in a day. I think you are going to have to validate by calculation. This may require some new relationships.
Adam Runtime Posted June 7, 2004 Author Posted June 7, 2004 i'm trying to do that but I'm new to filemaker, i'm used to programming in Java and PHP and SQL, so this menu-driven approach is driving me a bit nuts now..... Do I need a calculation or a script? I'm now trying to run a script, been advised by FM tech support that I can use a loop to run through all values and check no sessions occur in more than one day, but how do I know which session I'm referring to?? Any help greatly appreciated!! Thanks
Adam Runtime Posted June 7, 2004 Author Posted June 7, 2004 BTW, a session cannot occur in more than one day, one day can contain many sessions.
Adam Runtime Posted June 8, 2004 Author Posted June 8, 2004 * bump * Do I need to loop through all Days and Sessions contained within each day to check this? I have started to look at the scripting, but dont know how to differentiate between THIS instance and any other....?? I'm used to programming languages and arrays etc, this is a new approach for me.... Thanks
the Otter Posted June 10, 2004 Posted June 10, 2004 I am new to FM, and I need to validate certain fields to prevent duplicate data and, in this instance, I have a Day table and a Session table, and I need to make sure that no sessions are referenced in more than one day. I also need to validate sessions in terms of tutors who run the sessions, to make sure no tutor is booked for more than one session at a time. Are you using FileMaker Pro 7? In 7, it should be pretty simple; just create a second instance of the Day table and create a second relationship, identical to the first, e.g.: Day::Session ID = Session::Session ID = Day2::Session ID In the validation dialog, validate by calculation, starting from the Day table: If(Sum(Day2::Session ID > Day::Session ID, 0, 1) In other words, if the sum of all related Session ID
Recommended Posts
This topic is 7816 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