June 7, 200421 yr 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.
June 7, 200421 yr 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.
June 7, 200421 yr Author 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
June 7, 200421 yr Author BTW, a session cannot occur in more than one day, one day can contain many sessions.
June 8, 200421 yr Author * 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
June 10, 200421 yr 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
Create an account or sign in to comment