Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

validation of field values - need help!!

Featured Replies

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.

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.

  • 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

  • Author

BTW, a session cannot occur in more than one day, one day can contain many sessions.

  • 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

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.