Jump to content

This topic is 7540 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Posted

* 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

Posted

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

This topic is 7540 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.